Linux Bootup Issue, Repair Entry
Linux Bootup Issue, Repair Entry
by NI XCRAF T on APRIL 19, 2006 26 COM M ENTS LAST UPDATED DECEM BER 24, 2008 in CENTOS, DEBI AN / UBUNT U , LI NUX
Q. How do I boot a Linux system into single user mode? A. Single user mode is useful to fix some system problem. Following are steps you need to use to boot Grub boot loader into single user mode.
Procedure: Boot Linux Grub Boot Loader into single user mode
(1) At grub boot screen (after restart) (2) Select the kernel (3) Press the e key to edit the entry (4) Select second line (the line starting with the word kernel)
(if you dont see this screen, just press e and then from there press on the up arrow key)
(5) Press the e key to edit kernel entry so that you can append single user mode (6) Append the letter S (or word Single) to the end of the (kernel) line
(8) Now press the b key to boot the Linux kernel into single user mode (9) When prompted give root password and you be allowed to login into single user mode.
Error Message
[FAILED]
*** An error occurred during the file system check. *** Dropping you to a shell; the system will reboot *** when you leave the shell Give root password for maintenance (or type Control-D to continue):
When the above error is found many ask the question, how to recover from the error. From the above error it is obvious that the error is something relaed to a filsystem. TO over come this issue you have to edit the /etc/fstab. When this error occurs you cannot edit the /etc/fstab file as it is, to edit the file you have to login as single user, then mount the filesystem. After that only you can edit the files or /etc/fstab. Steps for recovery:
1) Login as single user mode 2) Provide the password
OR
3) mount -av
Edit /etc/fstab
4) vi /etc/fstab
# e2label /dev/sda1
If you specify bad device number then you might get error as below
# e2label /dev/sdaxx
OUTPUT:
e2label: Bad magic number in super-block while trying to open /dev/sda Couldn't find valid filesystem superblock.
blkid /dev/sda1
OUTPUT:
# /dev/sda1: UUID="1d35d020-f6a1-456f-91e6-4a722111a766" TYPE="ext3"
The blkid is the command which is used to find the block-id of the disk.