Boot drops to a (initramfs) prompts/busybox

Multi tool use
I am running an HP pavilion dv6000 dual boot win7 and Ubuntu 12.04. (well, up until today). After a reboot, the boot process drops to the BusyBox shell and I end up at the prompt:
BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs)
I've been researching others who have had this same problem, but haven't been able to find any of those solutions to work for me.
I tried the method described here, and after the final command
mount -t ntfs-3g /dev/sda1 /root -o force
it does nothing and gives me another (initramfs) prompt.
I can boot to a live CD (USB) and get to a terminal, but it doesn't seem to do much good, as I can see the /dev/sda1 in the ls command, but it doesn't recognize it when I try to cd to it.
One more question: using the command fdisk -l
how can I tell which mount point (sda1
/sda2
) is my windows partition and which one is Ubuntu?
boot initramfs
add a comment |
I am running an HP pavilion dv6000 dual boot win7 and Ubuntu 12.04. (well, up until today). After a reboot, the boot process drops to the BusyBox shell and I end up at the prompt:
BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs)
I've been researching others who have had this same problem, but haven't been able to find any of those solutions to work for me.
I tried the method described here, and after the final command
mount -t ntfs-3g /dev/sda1 /root -o force
it does nothing and gives me another (initramfs) prompt.
I can boot to a live CD (USB) and get to a terminal, but it doesn't seem to do much good, as I can see the /dev/sda1 in the ls command, but it doesn't recognize it when I try to cd to it.
One more question: using the command fdisk -l
how can I tell which mount point (sda1
/sda2
) is my windows partition and which one is Ubuntu?
boot initramfs
1
This was the winner, BTW cyberciti.biz/faq/…
– dpm
May 17 '12 at 1:30
3
I can't believe Canonical hasn't implemented yet a proper user-friendly workflow to fix this situation :(
– knocte
Jul 12 '16 at 3:35
There has to be a better way to fix the case. You do not need Live Ubuntu for the task, since I have managed to solve it without it. I think you can fix the thing even in(inittramfs)
.
– Léo Léopold Hertz 준영
Aug 18 '16 at 5:57
4
@Masi Actually, running fsck from initramfs fixes it in most cases now, but in the ubuntu release that was current when this question was posted, even afterfsck
was run, the same error was shown on boot again.
– Amith KK
Dec 14 '16 at 11:46
add a comment |
I am running an HP pavilion dv6000 dual boot win7 and Ubuntu 12.04. (well, up until today). After a reboot, the boot process drops to the BusyBox shell and I end up at the prompt:
BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs)
I've been researching others who have had this same problem, but haven't been able to find any of those solutions to work for me.
I tried the method described here, and after the final command
mount -t ntfs-3g /dev/sda1 /root -o force
it does nothing and gives me another (initramfs) prompt.
I can boot to a live CD (USB) and get to a terminal, but it doesn't seem to do much good, as I can see the /dev/sda1 in the ls command, but it doesn't recognize it when I try to cd to it.
One more question: using the command fdisk -l
how can I tell which mount point (sda1
/sda2
) is my windows partition and which one is Ubuntu?
boot initramfs
I am running an HP pavilion dv6000 dual boot win7 and Ubuntu 12.04. (well, up until today). After a reboot, the boot process drops to the BusyBox shell and I end up at the prompt:
BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs)
I've been researching others who have had this same problem, but haven't been able to find any of those solutions to work for me.
I tried the method described here, and after the final command
mount -t ntfs-3g /dev/sda1 /root -o force
it does nothing and gives me another (initramfs) prompt.
I can boot to a live CD (USB) and get to a terminal, but it doesn't seem to do much good, as I can see the /dev/sda1 in the ls command, but it doesn't recognize it when I try to cd to it.
One more question: using the command fdisk -l
how can I tell which mount point (sda1
/sda2
) is my windows partition and which one is Ubuntu?
boot initramfs
boot initramfs
edited Oct 30 '18 at 11:32


pomsky
31.4k1194127
31.4k1194127
asked May 16 '12 at 2:04
dpmdpm
871273
871273
1
This was the winner, BTW cyberciti.biz/faq/…
– dpm
May 17 '12 at 1:30
3
I can't believe Canonical hasn't implemented yet a proper user-friendly workflow to fix this situation :(
– knocte
Jul 12 '16 at 3:35
There has to be a better way to fix the case. You do not need Live Ubuntu for the task, since I have managed to solve it without it. I think you can fix the thing even in(inittramfs)
.
– Léo Léopold Hertz 준영
Aug 18 '16 at 5:57
4
@Masi Actually, running fsck from initramfs fixes it in most cases now, but in the ubuntu release that was current when this question was posted, even afterfsck
was run, the same error was shown on boot again.
– Amith KK
Dec 14 '16 at 11:46
add a comment |
1
This was the winner, BTW cyberciti.biz/faq/…
– dpm
May 17 '12 at 1:30
3
I can't believe Canonical hasn't implemented yet a proper user-friendly workflow to fix this situation :(
– knocte
Jul 12 '16 at 3:35
There has to be a better way to fix the case. You do not need Live Ubuntu for the task, since I have managed to solve it without it. I think you can fix the thing even in(inittramfs)
.
– Léo Léopold Hertz 준영
Aug 18 '16 at 5:57
4
@Masi Actually, running fsck from initramfs fixes it in most cases now, but in the ubuntu release that was current when this question was posted, even afterfsck
was run, the same error was shown on boot again.
– Amith KK
Dec 14 '16 at 11:46
1
1
This was the winner, BTW cyberciti.biz/faq/…
– dpm
May 17 '12 at 1:30
This was the winner, BTW cyberciti.biz/faq/…
– dpm
May 17 '12 at 1:30
3
3
I can't believe Canonical hasn't implemented yet a proper user-friendly workflow to fix this situation :(
– knocte
Jul 12 '16 at 3:35
I can't believe Canonical hasn't implemented yet a proper user-friendly workflow to fix this situation :(
– knocte
Jul 12 '16 at 3:35
There has to be a better way to fix the case. You do not need Live Ubuntu for the task, since I have managed to solve it without it. I think you can fix the thing even in
(inittramfs)
.– Léo Léopold Hertz 준영
Aug 18 '16 at 5:57
There has to be a better way to fix the case. You do not need Live Ubuntu for the task, since I have managed to solve it without it. I think you can fix the thing even in
(inittramfs)
.– Léo Léopold Hertz 준영
Aug 18 '16 at 5:57
4
4
@Masi Actually, running fsck from initramfs fixes it in most cases now, but in the ubuntu release that was current when this question was posted, even after
fsck
was run, the same error was shown on boot again.– Amith KK
Dec 14 '16 at 11:46
@Masi Actually, running fsck from initramfs fixes it in most cases now, but in the ubuntu release that was current when this question was posted, even after
fsck
was run, the same error was shown on boot again.– Amith KK
Dec 14 '16 at 11:46
add a comment |
5 Answers
5
active
oldest
votes
While at initramfs console, I passed a command exit to come out of the shell. The same console was presented before me but this time with the exact name of the partition that got corrupted.
BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs) exit
/dev/mapper/ubuntu--vg-root: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
fsck exited with status code 4.
The root filesystem on /dev/mapper/ubuntu--vg-root requires a manual fsck.
BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs) fsck /dev/mapper/ubuntu--vg-root -y
fsck from util-linux 2.27.1
e2fsck 1.42.13 (17-May-2015)
/dev/mapper/ubuntu--vg-root contains a file system with errors, check forced.
After the checking is done, I rebooted the system.
BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs) reboot
and that's it, I got back into the filesystem without any errors.
11
Worked for Ubuntu 16.04
– Hastig Zusammenstellen
Sep 30 '16 at 13:54
2
Worked for me. But why did it happen?
– आनंद
May 30 '17 at 17:23
1
All hail ramsudharsan saviour of the universe
– Mike Miller
Aug 3 '17 at 6:40
1
But what if the keyboard isn't working? :-/
– Matt
Sep 6 '17 at 17:45
2
@Matt Enable the keyboard option in BIOS settings (If you have disabled keyboard during boot-up, hold the power button until you hear the reset sound from the board)
– ramsudharsan
Sep 7 '17 at 1:52
|
show 12 more comments
It seems that you have a bad superblock. To fix this:
Firstly, boot into a live CD or USB
Find out your partition number by using
sudo fdisk -l|grep Linux|grep -Ev 'swap'
Then, list all superblocks by using the command:
sudo dumpe2fs /dev/sda2 | grep superblock
Replace sda2
to your drive number
You should get a similar output like this
Primary superblock at 0, Group descriptors at 1-6
Backup superblock at 32768, Group descriptors at 32769-32774
Backup superblock at 98304, Group descriptors at 98305-98310
Backup superblock at 163840, Group descriptors at 163841-163846
Backup superblock at 229376, Group descriptors at 229377-229382
Backup superblock at 294912, Group descriptors at 294913-294918
Backup superblock at 819200, Group descriptors at 819201-819206
Backup superblock at 884736, Group descriptors at 884737-884742
Backup superblock at 1605632, Group descriptors at 1605633-1605638
Backup superblock at 2654208, Group descriptors at 2654209-2654214
Backup superblock at 4096000, Group descriptors at 4096001-4096006
Backup superblock at 7962624, Group descriptors at 7962625-7962630
Backup superblock at 11239424, Group descriptors at 11239425-11239430
Backup superblock at 20480000, Group descriptors at 20480001-20480006
Backup superblock at 23887872, Group descriptors at 23887873-23887878
Choose an alternate superblock from this list, for this case alternate superblock # 32768
Now, to check and repair a Linux file system using alternate superblock # 32768:
sudo fsck -b 32768 /dev/sda2 -y
The -y
flag is used to skip all the Fix?
questions and to answer them all with a yes automatically
You should get similar output like this:
fsck 1.40.2 (12-Jul-2007)
e2fsck 1.40.2 (12-Jul-2007)
/dev/sda2 was not cleanly unmounted, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Free blocks count wrong for group #241 (32254, counted=32253).
Fix? yes
Free blocks count wrong for group #362 (32254, counted=32248).
Fix? yes
Free blocks count wrong for group #368 (32254, counted=27774).
Fix? yes
..........
/dev/sda2: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda2: 59586/30539776 files (0.6% non-contiguous), 3604682/61059048 blocks
Now try mounting the partition
sudo mount /dev/sda2 /mnt
Now, try to browse the filesystem with the following commands
cd /mnt
mkdir test
ls -l
cp file /path/to/safe/location
If you are able to perform the above commands, you have most probably fixed your error.
Now, restart you computer and you should be able to boot normally.
(source)
1
I have followed all the steps for sda1 but can't do last part "mkdir test"!! There is also sda5 so I suppose to repeat steps for that?
– Freddy
Apr 8 '15 at 9:40
2
You write "Select an alternate superblock". Alternate to what? Can I pick any from the list?
– Mads Skjern
Oct 27 '15 at 11:32
1
I suggest adding to the answer, that one must answer yes to each of the "Fix questions". But also that there can be hundres of these questions, and one can answer yes for all, by using "-y" flag.
– Mads Skjern
Oct 27 '15 at 11:46
2
+1 for those that were using gparted and now are here
– Vitor Abella
Aug 27 '16 at 3:29
2
what ifsudo fdisk -l|grep Linux|grep -Ev 'swap'
returns 2 lines? /dev/sda2 and /dev/sda5 for me
– knocte
Oct 2 '16 at 8:42
|
show 12 more comments
Actually the solution is easy
just write the command of fsck /dev/sdax
like the below and give Y
if the console ask for fixing something:
(initramfs) fsck /dev/sda1
or
(initramfs) fsck /dev/sdaX
X
specifies mounted disk part number.
If you don't want to manually press 'y' every time it asks for a fix, you can also run the command with the -y
option.
(initramfs) fsck /dev/sdaX -y
4
thanks dude this solved my problem, it was on the /dev/sda5
– ABD ELLATIF LAKEHAL
Jun 16 '17 at 12:50
4
Why this answer isn't accepted yet? Simple and working.
– Swapnil
Sep 20 '17 at 15:10
2
Great and easiest solution!
– kunicmarko20
Feb 3 '18 at 8:26
1
Saved my ass !!!
– Eric Wang
Mar 18 '18 at 16:40
1
Should be the accepted answer
– Kareem
Aug 24 '18 at 6:51
|
show 4 more comments
- Simple Answer is remove your hard disk attach in onother system and start the system (please don't boot from your initramfs error hard disk use any with Ubuntu and
gparted
installed). - start
gparted
and select your hard disk and select CHECK from right click menu.
add a comment |
I just tried a lucky shot by booting the system with the "Parted Magic" tool from a Live CD. Looking at the partitions, there was a declared "unknown space" of some GBytes on the Linux partition.
So I just widened the Linux space over the whole Partition and voila - since then my Linux boots as before without any fail so far.
add a comment |
protected by Community♦ Dec 19 '12 at 1:48
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
While at initramfs console, I passed a command exit to come out of the shell. The same console was presented before me but this time with the exact name of the partition that got corrupted.
BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs) exit
/dev/mapper/ubuntu--vg-root: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
fsck exited with status code 4.
The root filesystem on /dev/mapper/ubuntu--vg-root requires a manual fsck.
BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs) fsck /dev/mapper/ubuntu--vg-root -y
fsck from util-linux 2.27.1
e2fsck 1.42.13 (17-May-2015)
/dev/mapper/ubuntu--vg-root contains a file system with errors, check forced.
After the checking is done, I rebooted the system.
BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs) reboot
and that's it, I got back into the filesystem without any errors.
11
Worked for Ubuntu 16.04
– Hastig Zusammenstellen
Sep 30 '16 at 13:54
2
Worked for me. But why did it happen?
– आनंद
May 30 '17 at 17:23
1
All hail ramsudharsan saviour of the universe
– Mike Miller
Aug 3 '17 at 6:40
1
But what if the keyboard isn't working? :-/
– Matt
Sep 6 '17 at 17:45
2
@Matt Enable the keyboard option in BIOS settings (If you have disabled keyboard during boot-up, hold the power button until you hear the reset sound from the board)
– ramsudharsan
Sep 7 '17 at 1:52
|
show 12 more comments
While at initramfs console, I passed a command exit to come out of the shell. The same console was presented before me but this time with the exact name of the partition that got corrupted.
BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs) exit
/dev/mapper/ubuntu--vg-root: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
fsck exited with status code 4.
The root filesystem on /dev/mapper/ubuntu--vg-root requires a manual fsck.
BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs) fsck /dev/mapper/ubuntu--vg-root -y
fsck from util-linux 2.27.1
e2fsck 1.42.13 (17-May-2015)
/dev/mapper/ubuntu--vg-root contains a file system with errors, check forced.
After the checking is done, I rebooted the system.
BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs) reboot
and that's it, I got back into the filesystem without any errors.
11
Worked for Ubuntu 16.04
– Hastig Zusammenstellen
Sep 30 '16 at 13:54
2
Worked for me. But why did it happen?
– आनंद
May 30 '17 at 17:23
1
All hail ramsudharsan saviour of the universe
– Mike Miller
Aug 3 '17 at 6:40
1
But what if the keyboard isn't working? :-/
– Matt
Sep 6 '17 at 17:45
2
@Matt Enable the keyboard option in BIOS settings (If you have disabled keyboard during boot-up, hold the power button until you hear the reset sound from the board)
– ramsudharsan
Sep 7 '17 at 1:52
|
show 12 more comments
While at initramfs console, I passed a command exit to come out of the shell. The same console was presented before me but this time with the exact name of the partition that got corrupted.
BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs) exit
/dev/mapper/ubuntu--vg-root: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
fsck exited with status code 4.
The root filesystem on /dev/mapper/ubuntu--vg-root requires a manual fsck.
BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs) fsck /dev/mapper/ubuntu--vg-root -y
fsck from util-linux 2.27.1
e2fsck 1.42.13 (17-May-2015)
/dev/mapper/ubuntu--vg-root contains a file system with errors, check forced.
After the checking is done, I rebooted the system.
BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs) reboot
and that's it, I got back into the filesystem without any errors.
While at initramfs console, I passed a command exit to come out of the shell. The same console was presented before me but this time with the exact name of the partition that got corrupted.
BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs) exit
/dev/mapper/ubuntu--vg-root: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
fsck exited with status code 4.
The root filesystem on /dev/mapper/ubuntu--vg-root requires a manual fsck.
BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs) fsck /dev/mapper/ubuntu--vg-root -y
fsck from util-linux 2.27.1
e2fsck 1.42.13 (17-May-2015)
/dev/mapper/ubuntu--vg-root contains a file system with errors, check forced.
After the checking is done, I rebooted the system.
BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash)
Enter 'help' for a list of built-in commands.
(initramfs) reboot
and that's it, I got back into the filesystem without any errors.
edited Nov 16 '16 at 23:27
Xavier Combelle
1033
1033
answered Aug 28 '16 at 3:33


ramsudharsanramsudharsan
1,891185
1,891185
11
Worked for Ubuntu 16.04
– Hastig Zusammenstellen
Sep 30 '16 at 13:54
2
Worked for me. But why did it happen?
– आनंद
May 30 '17 at 17:23
1
All hail ramsudharsan saviour of the universe
– Mike Miller
Aug 3 '17 at 6:40
1
But what if the keyboard isn't working? :-/
– Matt
Sep 6 '17 at 17:45
2
@Matt Enable the keyboard option in BIOS settings (If you have disabled keyboard during boot-up, hold the power button until you hear the reset sound from the board)
– ramsudharsan
Sep 7 '17 at 1:52
|
show 12 more comments
11
Worked for Ubuntu 16.04
– Hastig Zusammenstellen
Sep 30 '16 at 13:54
2
Worked for me. But why did it happen?
– आनंद
May 30 '17 at 17:23
1
All hail ramsudharsan saviour of the universe
– Mike Miller
Aug 3 '17 at 6:40
1
But what if the keyboard isn't working? :-/
– Matt
Sep 6 '17 at 17:45
2
@Matt Enable the keyboard option in BIOS settings (If you have disabled keyboard during boot-up, hold the power button until you hear the reset sound from the board)
– ramsudharsan
Sep 7 '17 at 1:52
11
11
Worked for Ubuntu 16.04
– Hastig Zusammenstellen
Sep 30 '16 at 13:54
Worked for Ubuntu 16.04
– Hastig Zusammenstellen
Sep 30 '16 at 13:54
2
2
Worked for me. But why did it happen?
– आनंद
May 30 '17 at 17:23
Worked for me. But why did it happen?
– आनंद
May 30 '17 at 17:23
1
1
All hail ramsudharsan saviour of the universe
– Mike Miller
Aug 3 '17 at 6:40
All hail ramsudharsan saviour of the universe
– Mike Miller
Aug 3 '17 at 6:40
1
1
But what if the keyboard isn't working? :-/
– Matt
Sep 6 '17 at 17:45
But what if the keyboard isn't working? :-/
– Matt
Sep 6 '17 at 17:45
2
2
@Matt Enable the keyboard option in BIOS settings (If you have disabled keyboard during boot-up, hold the power button until you hear the reset sound from the board)
– ramsudharsan
Sep 7 '17 at 1:52
@Matt Enable the keyboard option in BIOS settings (If you have disabled keyboard during boot-up, hold the power button until you hear the reset sound from the board)
– ramsudharsan
Sep 7 '17 at 1:52
|
show 12 more comments
It seems that you have a bad superblock. To fix this:
Firstly, boot into a live CD or USB
Find out your partition number by using
sudo fdisk -l|grep Linux|grep -Ev 'swap'
Then, list all superblocks by using the command:
sudo dumpe2fs /dev/sda2 | grep superblock
Replace sda2
to your drive number
You should get a similar output like this
Primary superblock at 0, Group descriptors at 1-6
Backup superblock at 32768, Group descriptors at 32769-32774
Backup superblock at 98304, Group descriptors at 98305-98310
Backup superblock at 163840, Group descriptors at 163841-163846
Backup superblock at 229376, Group descriptors at 229377-229382
Backup superblock at 294912, Group descriptors at 294913-294918
Backup superblock at 819200, Group descriptors at 819201-819206
Backup superblock at 884736, Group descriptors at 884737-884742
Backup superblock at 1605632, Group descriptors at 1605633-1605638
Backup superblock at 2654208, Group descriptors at 2654209-2654214
Backup superblock at 4096000, Group descriptors at 4096001-4096006
Backup superblock at 7962624, Group descriptors at 7962625-7962630
Backup superblock at 11239424, Group descriptors at 11239425-11239430
Backup superblock at 20480000, Group descriptors at 20480001-20480006
Backup superblock at 23887872, Group descriptors at 23887873-23887878
Choose an alternate superblock from this list, for this case alternate superblock # 32768
Now, to check and repair a Linux file system using alternate superblock # 32768:
sudo fsck -b 32768 /dev/sda2 -y
The -y
flag is used to skip all the Fix?
questions and to answer them all with a yes automatically
You should get similar output like this:
fsck 1.40.2 (12-Jul-2007)
e2fsck 1.40.2 (12-Jul-2007)
/dev/sda2 was not cleanly unmounted, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Free blocks count wrong for group #241 (32254, counted=32253).
Fix? yes
Free blocks count wrong for group #362 (32254, counted=32248).
Fix? yes
Free blocks count wrong for group #368 (32254, counted=27774).
Fix? yes
..........
/dev/sda2: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda2: 59586/30539776 files (0.6% non-contiguous), 3604682/61059048 blocks
Now try mounting the partition
sudo mount /dev/sda2 /mnt
Now, try to browse the filesystem with the following commands
cd /mnt
mkdir test
ls -l
cp file /path/to/safe/location
If you are able to perform the above commands, you have most probably fixed your error.
Now, restart you computer and you should be able to boot normally.
(source)
1
I have followed all the steps for sda1 but can't do last part "mkdir test"!! There is also sda5 so I suppose to repeat steps for that?
– Freddy
Apr 8 '15 at 9:40
2
You write "Select an alternate superblock". Alternate to what? Can I pick any from the list?
– Mads Skjern
Oct 27 '15 at 11:32
1
I suggest adding to the answer, that one must answer yes to each of the "Fix questions". But also that there can be hundres of these questions, and one can answer yes for all, by using "-y" flag.
– Mads Skjern
Oct 27 '15 at 11:46
2
+1 for those that were using gparted and now are here
– Vitor Abella
Aug 27 '16 at 3:29
2
what ifsudo fdisk -l|grep Linux|grep -Ev 'swap'
returns 2 lines? /dev/sda2 and /dev/sda5 for me
– knocte
Oct 2 '16 at 8:42
|
show 12 more comments
It seems that you have a bad superblock. To fix this:
Firstly, boot into a live CD or USB
Find out your partition number by using
sudo fdisk -l|grep Linux|grep -Ev 'swap'
Then, list all superblocks by using the command:
sudo dumpe2fs /dev/sda2 | grep superblock
Replace sda2
to your drive number
You should get a similar output like this
Primary superblock at 0, Group descriptors at 1-6
Backup superblock at 32768, Group descriptors at 32769-32774
Backup superblock at 98304, Group descriptors at 98305-98310
Backup superblock at 163840, Group descriptors at 163841-163846
Backup superblock at 229376, Group descriptors at 229377-229382
Backup superblock at 294912, Group descriptors at 294913-294918
Backup superblock at 819200, Group descriptors at 819201-819206
Backup superblock at 884736, Group descriptors at 884737-884742
Backup superblock at 1605632, Group descriptors at 1605633-1605638
Backup superblock at 2654208, Group descriptors at 2654209-2654214
Backup superblock at 4096000, Group descriptors at 4096001-4096006
Backup superblock at 7962624, Group descriptors at 7962625-7962630
Backup superblock at 11239424, Group descriptors at 11239425-11239430
Backup superblock at 20480000, Group descriptors at 20480001-20480006
Backup superblock at 23887872, Group descriptors at 23887873-23887878
Choose an alternate superblock from this list, for this case alternate superblock # 32768
Now, to check and repair a Linux file system using alternate superblock # 32768:
sudo fsck -b 32768 /dev/sda2 -y
The -y
flag is used to skip all the Fix?
questions and to answer them all with a yes automatically
You should get similar output like this:
fsck 1.40.2 (12-Jul-2007)
e2fsck 1.40.2 (12-Jul-2007)
/dev/sda2 was not cleanly unmounted, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Free blocks count wrong for group #241 (32254, counted=32253).
Fix? yes
Free blocks count wrong for group #362 (32254, counted=32248).
Fix? yes
Free blocks count wrong for group #368 (32254, counted=27774).
Fix? yes
..........
/dev/sda2: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda2: 59586/30539776 files (0.6% non-contiguous), 3604682/61059048 blocks
Now try mounting the partition
sudo mount /dev/sda2 /mnt
Now, try to browse the filesystem with the following commands
cd /mnt
mkdir test
ls -l
cp file /path/to/safe/location
If you are able to perform the above commands, you have most probably fixed your error.
Now, restart you computer and you should be able to boot normally.
(source)
1
I have followed all the steps for sda1 but can't do last part "mkdir test"!! There is also sda5 so I suppose to repeat steps for that?
– Freddy
Apr 8 '15 at 9:40
2
You write "Select an alternate superblock". Alternate to what? Can I pick any from the list?
– Mads Skjern
Oct 27 '15 at 11:32
1
I suggest adding to the answer, that one must answer yes to each of the "Fix questions". But also that there can be hundres of these questions, and one can answer yes for all, by using "-y" flag.
– Mads Skjern
Oct 27 '15 at 11:46
2
+1 for those that were using gparted and now are here
– Vitor Abella
Aug 27 '16 at 3:29
2
what ifsudo fdisk -l|grep Linux|grep -Ev 'swap'
returns 2 lines? /dev/sda2 and /dev/sda5 for me
– knocte
Oct 2 '16 at 8:42
|
show 12 more comments
It seems that you have a bad superblock. To fix this:
Firstly, boot into a live CD or USB
Find out your partition number by using
sudo fdisk -l|grep Linux|grep -Ev 'swap'
Then, list all superblocks by using the command:
sudo dumpe2fs /dev/sda2 | grep superblock
Replace sda2
to your drive number
You should get a similar output like this
Primary superblock at 0, Group descriptors at 1-6
Backup superblock at 32768, Group descriptors at 32769-32774
Backup superblock at 98304, Group descriptors at 98305-98310
Backup superblock at 163840, Group descriptors at 163841-163846
Backup superblock at 229376, Group descriptors at 229377-229382
Backup superblock at 294912, Group descriptors at 294913-294918
Backup superblock at 819200, Group descriptors at 819201-819206
Backup superblock at 884736, Group descriptors at 884737-884742
Backup superblock at 1605632, Group descriptors at 1605633-1605638
Backup superblock at 2654208, Group descriptors at 2654209-2654214
Backup superblock at 4096000, Group descriptors at 4096001-4096006
Backup superblock at 7962624, Group descriptors at 7962625-7962630
Backup superblock at 11239424, Group descriptors at 11239425-11239430
Backup superblock at 20480000, Group descriptors at 20480001-20480006
Backup superblock at 23887872, Group descriptors at 23887873-23887878
Choose an alternate superblock from this list, for this case alternate superblock # 32768
Now, to check and repair a Linux file system using alternate superblock # 32768:
sudo fsck -b 32768 /dev/sda2 -y
The -y
flag is used to skip all the Fix?
questions and to answer them all with a yes automatically
You should get similar output like this:
fsck 1.40.2 (12-Jul-2007)
e2fsck 1.40.2 (12-Jul-2007)
/dev/sda2 was not cleanly unmounted, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Free blocks count wrong for group #241 (32254, counted=32253).
Fix? yes
Free blocks count wrong for group #362 (32254, counted=32248).
Fix? yes
Free blocks count wrong for group #368 (32254, counted=27774).
Fix? yes
..........
/dev/sda2: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda2: 59586/30539776 files (0.6% non-contiguous), 3604682/61059048 blocks
Now try mounting the partition
sudo mount /dev/sda2 /mnt
Now, try to browse the filesystem with the following commands
cd /mnt
mkdir test
ls -l
cp file /path/to/safe/location
If you are able to perform the above commands, you have most probably fixed your error.
Now, restart you computer and you should be able to boot normally.
(source)
It seems that you have a bad superblock. To fix this:
Firstly, boot into a live CD or USB
Find out your partition number by using
sudo fdisk -l|grep Linux|grep -Ev 'swap'
Then, list all superblocks by using the command:
sudo dumpe2fs /dev/sda2 | grep superblock
Replace sda2
to your drive number
You should get a similar output like this
Primary superblock at 0, Group descriptors at 1-6
Backup superblock at 32768, Group descriptors at 32769-32774
Backup superblock at 98304, Group descriptors at 98305-98310
Backup superblock at 163840, Group descriptors at 163841-163846
Backup superblock at 229376, Group descriptors at 229377-229382
Backup superblock at 294912, Group descriptors at 294913-294918
Backup superblock at 819200, Group descriptors at 819201-819206
Backup superblock at 884736, Group descriptors at 884737-884742
Backup superblock at 1605632, Group descriptors at 1605633-1605638
Backup superblock at 2654208, Group descriptors at 2654209-2654214
Backup superblock at 4096000, Group descriptors at 4096001-4096006
Backup superblock at 7962624, Group descriptors at 7962625-7962630
Backup superblock at 11239424, Group descriptors at 11239425-11239430
Backup superblock at 20480000, Group descriptors at 20480001-20480006
Backup superblock at 23887872, Group descriptors at 23887873-23887878
Choose an alternate superblock from this list, for this case alternate superblock # 32768
Now, to check and repair a Linux file system using alternate superblock # 32768:
sudo fsck -b 32768 /dev/sda2 -y
The -y
flag is used to skip all the Fix?
questions and to answer them all with a yes automatically
You should get similar output like this:
fsck 1.40.2 (12-Jul-2007)
e2fsck 1.40.2 (12-Jul-2007)
/dev/sda2 was not cleanly unmounted, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Free blocks count wrong for group #241 (32254, counted=32253).
Fix? yes
Free blocks count wrong for group #362 (32254, counted=32248).
Fix? yes
Free blocks count wrong for group #368 (32254, counted=27774).
Fix? yes
..........
/dev/sda2: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda2: 59586/30539776 files (0.6% non-contiguous), 3604682/61059048 blocks
Now try mounting the partition
sudo mount /dev/sda2 /mnt
Now, try to browse the filesystem with the following commands
cd /mnt
mkdir test
ls -l
cp file /path/to/safe/location
If you are able to perform the above commands, you have most probably fixed your error.
Now, restart you computer and you should be able to boot normally.
(source)
edited Jan 20 '16 at 19:25
answered Jun 10 '12 at 3:37
Amith KKAmith KK
10.3k1255111
10.3k1255111
1
I have followed all the steps for sda1 but can't do last part "mkdir test"!! There is also sda5 so I suppose to repeat steps for that?
– Freddy
Apr 8 '15 at 9:40
2
You write "Select an alternate superblock". Alternate to what? Can I pick any from the list?
– Mads Skjern
Oct 27 '15 at 11:32
1
I suggest adding to the answer, that one must answer yes to each of the "Fix questions". But also that there can be hundres of these questions, and one can answer yes for all, by using "-y" flag.
– Mads Skjern
Oct 27 '15 at 11:46
2
+1 for those that were using gparted and now are here
– Vitor Abella
Aug 27 '16 at 3:29
2
what ifsudo fdisk -l|grep Linux|grep -Ev 'swap'
returns 2 lines? /dev/sda2 and /dev/sda5 for me
– knocte
Oct 2 '16 at 8:42
|
show 12 more comments
1
I have followed all the steps for sda1 but can't do last part "mkdir test"!! There is also sda5 so I suppose to repeat steps for that?
– Freddy
Apr 8 '15 at 9:40
2
You write "Select an alternate superblock". Alternate to what? Can I pick any from the list?
– Mads Skjern
Oct 27 '15 at 11:32
1
I suggest adding to the answer, that one must answer yes to each of the "Fix questions". But also that there can be hundres of these questions, and one can answer yes for all, by using "-y" flag.
– Mads Skjern
Oct 27 '15 at 11:46
2
+1 for those that were using gparted and now are here
– Vitor Abella
Aug 27 '16 at 3:29
2
what ifsudo fdisk -l|grep Linux|grep -Ev 'swap'
returns 2 lines? /dev/sda2 and /dev/sda5 for me
– knocte
Oct 2 '16 at 8:42
1
1
I have followed all the steps for sda1 but can't do last part "mkdir test"!! There is also sda5 so I suppose to repeat steps for that?
– Freddy
Apr 8 '15 at 9:40
I have followed all the steps for sda1 but can't do last part "mkdir test"!! There is also sda5 so I suppose to repeat steps for that?
– Freddy
Apr 8 '15 at 9:40
2
2
You write "Select an alternate superblock". Alternate to what? Can I pick any from the list?
– Mads Skjern
Oct 27 '15 at 11:32
You write "Select an alternate superblock". Alternate to what? Can I pick any from the list?
– Mads Skjern
Oct 27 '15 at 11:32
1
1
I suggest adding to the answer, that one must answer yes to each of the "Fix questions". But also that there can be hundres of these questions, and one can answer yes for all, by using "-y" flag.
– Mads Skjern
Oct 27 '15 at 11:46
I suggest adding to the answer, that one must answer yes to each of the "Fix questions". But also that there can be hundres of these questions, and one can answer yes for all, by using "-y" flag.
– Mads Skjern
Oct 27 '15 at 11:46
2
2
+1 for those that were using gparted and now are here
– Vitor Abella
Aug 27 '16 at 3:29
+1 for those that were using gparted and now are here
– Vitor Abella
Aug 27 '16 at 3:29
2
2
what if
sudo fdisk -l|grep Linux|grep -Ev 'swap'
returns 2 lines? /dev/sda2 and /dev/sda5 for me– knocte
Oct 2 '16 at 8:42
what if
sudo fdisk -l|grep Linux|grep -Ev 'swap'
returns 2 lines? /dev/sda2 and /dev/sda5 for me– knocte
Oct 2 '16 at 8:42
|
show 12 more comments
Actually the solution is easy
just write the command of fsck /dev/sdax
like the below and give Y
if the console ask for fixing something:
(initramfs) fsck /dev/sda1
or
(initramfs) fsck /dev/sdaX
X
specifies mounted disk part number.
If you don't want to manually press 'y' every time it asks for a fix, you can also run the command with the -y
option.
(initramfs) fsck /dev/sdaX -y
4
thanks dude this solved my problem, it was on the /dev/sda5
– ABD ELLATIF LAKEHAL
Jun 16 '17 at 12:50
4
Why this answer isn't accepted yet? Simple and working.
– Swapnil
Sep 20 '17 at 15:10
2
Great and easiest solution!
– kunicmarko20
Feb 3 '18 at 8:26
1
Saved my ass !!!
– Eric Wang
Mar 18 '18 at 16:40
1
Should be the accepted answer
– Kareem
Aug 24 '18 at 6:51
|
show 4 more comments
Actually the solution is easy
just write the command of fsck /dev/sdax
like the below and give Y
if the console ask for fixing something:
(initramfs) fsck /dev/sda1
or
(initramfs) fsck /dev/sdaX
X
specifies mounted disk part number.
If you don't want to manually press 'y' every time it asks for a fix, you can also run the command with the -y
option.
(initramfs) fsck /dev/sdaX -y
4
thanks dude this solved my problem, it was on the /dev/sda5
– ABD ELLATIF LAKEHAL
Jun 16 '17 at 12:50
4
Why this answer isn't accepted yet? Simple and working.
– Swapnil
Sep 20 '17 at 15:10
2
Great and easiest solution!
– kunicmarko20
Feb 3 '18 at 8:26
1
Saved my ass !!!
– Eric Wang
Mar 18 '18 at 16:40
1
Should be the accepted answer
– Kareem
Aug 24 '18 at 6:51
|
show 4 more comments
Actually the solution is easy
just write the command of fsck /dev/sdax
like the below and give Y
if the console ask for fixing something:
(initramfs) fsck /dev/sda1
or
(initramfs) fsck /dev/sdaX
X
specifies mounted disk part number.
If you don't want to manually press 'y' every time it asks for a fix, you can also run the command with the -y
option.
(initramfs) fsck /dev/sdaX -y
Actually the solution is easy
just write the command of fsck /dev/sdax
like the below and give Y
if the console ask for fixing something:
(initramfs) fsck /dev/sda1
or
(initramfs) fsck /dev/sdaX
X
specifies mounted disk part number.
If you don't want to manually press 'y' every time it asks for a fix, you can also run the command with the -y
option.
(initramfs) fsck /dev/sdaX -y
edited Aug 24 '18 at 20:13
Vandesh
585
585
answered Jun 12 '17 at 9:00


efkanefkan
6212714
6212714
4
thanks dude this solved my problem, it was on the /dev/sda5
– ABD ELLATIF LAKEHAL
Jun 16 '17 at 12:50
4
Why this answer isn't accepted yet? Simple and working.
– Swapnil
Sep 20 '17 at 15:10
2
Great and easiest solution!
– kunicmarko20
Feb 3 '18 at 8:26
1
Saved my ass !!!
– Eric Wang
Mar 18 '18 at 16:40
1
Should be the accepted answer
– Kareem
Aug 24 '18 at 6:51
|
show 4 more comments
4
thanks dude this solved my problem, it was on the /dev/sda5
– ABD ELLATIF LAKEHAL
Jun 16 '17 at 12:50
4
Why this answer isn't accepted yet? Simple and working.
– Swapnil
Sep 20 '17 at 15:10
2
Great and easiest solution!
– kunicmarko20
Feb 3 '18 at 8:26
1
Saved my ass !!!
– Eric Wang
Mar 18 '18 at 16:40
1
Should be the accepted answer
– Kareem
Aug 24 '18 at 6:51
4
4
thanks dude this solved my problem, it was on the /dev/sda5
– ABD ELLATIF LAKEHAL
Jun 16 '17 at 12:50
thanks dude this solved my problem, it was on the /dev/sda5
– ABD ELLATIF LAKEHAL
Jun 16 '17 at 12:50
4
4
Why this answer isn't accepted yet? Simple and working.
– Swapnil
Sep 20 '17 at 15:10
Why this answer isn't accepted yet? Simple and working.
– Swapnil
Sep 20 '17 at 15:10
2
2
Great and easiest solution!
– kunicmarko20
Feb 3 '18 at 8:26
Great and easiest solution!
– kunicmarko20
Feb 3 '18 at 8:26
1
1
Saved my ass !!!
– Eric Wang
Mar 18 '18 at 16:40
Saved my ass !!!
– Eric Wang
Mar 18 '18 at 16:40
1
1
Should be the accepted answer
– Kareem
Aug 24 '18 at 6:51
Should be the accepted answer
– Kareem
Aug 24 '18 at 6:51
|
show 4 more comments
- Simple Answer is remove your hard disk attach in onother system and start the system (please don't boot from your initramfs error hard disk use any with Ubuntu and
gparted
installed). - start
gparted
and select your hard disk and select CHECK from right click menu.
add a comment |
- Simple Answer is remove your hard disk attach in onother system and start the system (please don't boot from your initramfs error hard disk use any with Ubuntu and
gparted
installed). - start
gparted
and select your hard disk and select CHECK from right click menu.
add a comment |
- Simple Answer is remove your hard disk attach in onother system and start the system (please don't boot from your initramfs error hard disk use any with Ubuntu and
gparted
installed). - start
gparted
and select your hard disk and select CHECK from right click menu.
- Simple Answer is remove your hard disk attach in onother system and start the system (please don't boot from your initramfs error hard disk use any with Ubuntu and
gparted
installed). - start
gparted
and select your hard disk and select CHECK from right click menu.
edited Apr 15 '15 at 0:42
Karl Richter
2,44483569
2,44483569
answered Feb 25 '15 at 10:28
khanthegeekkhanthegeek
429511
429511
add a comment |
add a comment |
I just tried a lucky shot by booting the system with the "Parted Magic" tool from a Live CD. Looking at the partitions, there was a declared "unknown space" of some GBytes on the Linux partition.
So I just widened the Linux space over the whole Partition and voila - since then my Linux boots as before without any fail so far.
add a comment |
I just tried a lucky shot by booting the system with the "Parted Magic" tool from a Live CD. Looking at the partitions, there was a declared "unknown space" of some GBytes on the Linux partition.
So I just widened the Linux space over the whole Partition and voila - since then my Linux boots as before without any fail so far.
add a comment |
I just tried a lucky shot by booting the system with the "Parted Magic" tool from a Live CD. Looking at the partitions, there was a declared "unknown space" of some GBytes on the Linux partition.
So I just widened the Linux space over the whole Partition and voila - since then my Linux boots as before without any fail so far.
I just tried a lucky shot by booting the system with the "Parted Magic" tool from a Live CD. Looking at the partitions, there was a declared "unknown space" of some GBytes on the Linux partition.
So I just widened the Linux space over the whole Partition and voila - since then my Linux boots as before without any fail so far.
edited Dec 29 '13 at 12:03
Braiam
52.1k20136222
52.1k20136222
answered Jun 9 '12 at 21:31
KaiKai
211
211
add a comment |
add a comment |
protected by Community♦ Dec 19 '12 at 1:48
Thank you for your interest in this question.
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
JoqFsNtUR,WR,uojsem
1
This was the winner, BTW cyberciti.biz/faq/…
– dpm
May 17 '12 at 1:30
3
I can't believe Canonical hasn't implemented yet a proper user-friendly workflow to fix this situation :(
– knocte
Jul 12 '16 at 3:35
There has to be a better way to fix the case. You do not need Live Ubuntu for the task, since I have managed to solve it without it. I think you can fix the thing even in
(inittramfs)
.– Léo Léopold Hertz 준영
Aug 18 '16 at 5:57
4
@Masi Actually, running fsck from initramfs fixes it in most cases now, but in the ubuntu release that was current when this question was posted, even after
fsck
was run, the same error was shown on boot again.– Amith KK
Dec 14 '16 at 11:46