Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 16

Thread: boot error

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    boot error


    trying to extend root storage but cant done then i leave everytging working fine i shutdown my pc then i restart now this is what happening

    Sent from my SM-G610F using Tapatalk

  2. #2
    Quote Originally Posted by harsin989 View Post
    trying to extend root storage but cant done then i leave everytging working fine i shutdown my pc then i restart now this is what happening

    Sent from my SM-G610F using Tapatalk
    anything can be helpfull

    Sent from my SM-G610F using Tapatalk

  3. #3
    Linux User
    Join Date
    Jul 2016
    Posts
    443
    well with problem descriptions like 'this is what happen", i think its probably best for you to use windows.

    either that or learn to read and look at the log file its telling you to look at. maybe post that instead of some pictures from a $2 cell phone.

  4. $spacer_open
    $spacer_close
  5. #4
    Quote Originally Posted by habit View Post
    well with problem descriptions like 'this is what happen", i think its probably best for you to use windows.

    either that or learn to read and look at the log file its telling you to look at. maybe post that instead of some pictures from a $2 cell phone.
    thanks to motivate always remember your advice ....."habit"

    Sent from my SM-G610F using Tapatalk

  6. #5
    I noticed a possible corruption which could complicate matters. Please read through entirety of my posts before doing anything!!!!!*****
    The issue is that, after adding new storage, the UUID's of your volumes changed (this can sometimes happen after installing other OS's, updating the ext filesystem firmware or udisks2, or for reasons which it may be impossible to diagnose.) It is by far the most common cause of boot errors across all linux distros. Either that or you inadvertently disconnected or damaged the drive containing your root filesystem.

    You said this was for a NAS, correct? If so, are you using RAID volumes? If you are, then your RAID Option ROM (or bios/EFI RAID extension firmware) are 100% to blame.

    Even with non-hardware/firmware or Option ROM software RAID, certain EFI/bios chipsets are flawed and do not make good use of a constant UUID, updating after hardware change or repartitioning. The idea of UUID's being used for physical drive identification versus their linux identifier (i.e. sdx#), is that if you add another drive, or change the SCSI/SATA/nVME/IDE/SAS port, UUID's are supposed to remain constant, whereas the drive/partition ID is usually determined by order of mount in the OS or recognition by the firmware. Most EFI firmware store the drive UUID in the name of a UTF-8 encoded text file on the EFI system partition (the FAT32 boot partition; this file may also be completely hidden from an end user by placing it in the MFT reserved area, just past the file allocation table, in a spot only the EFI firmware knows- if this is the case, low-level defragmentation that moves the MFT can corrupt this as well). In addition, Windows stores each partition's UUID in a hidden, system-protected folder called "System Volume Information" at the root of all NTFS/exFAT/FAT32/VFAT filesystems.



    Sent from my SM-N960U using Tapatalk
    Last edited by dbennett; 03-25-2019 at 08:02 AM.

  7. #6
    Quote Originally Posted by dbennett View Post
    The issue is that, after adding new storage, the UUID's of your volumes changed (this can sometimes happen after installing other OS's, updating the ext filesystem firmware or udisks2, or for reasons which it may be impossible to diagnose.) It is by far the most common cause of boot errors across all linux distros. Either that or you inadvertently disconnected or damaged the drive containing your root filesystem.

    You said this was for a NAS, correct? If so, are you using RAID volumes? If you are, then your RAID Option ROM (or bios/EFI RAID extension firmware) are 100% to blame.

    Even with non-hardware/firmware or Option ROM software RAID, certain EFI/bios chipsets are flawed and do not make good use of a constant UUID, updating after hardware change or repartitioning. The idea of UUID's being used for physical drive identification versus their linux identifier (i.e. sdx#), is that if you add another drive, or change the SCSI/SATA/nVME/IDE/SAS port, UUID's are supposed to remain constant, whereas the drive/partition ID is usually determined by order of mount in the OS or recognition by the firmware. Most EFI firmware store the drive UUID in the name of a UTF-8 encoded text file on the EFI system partition (the FAT32 boot partition; this file may also be completely hidden from an end user by placing it in the MFT reserved area, just past the file allocation table, in a spot only the EFI firmware knows- if this is the case, low-level defragmentation that moves the MFT can corrupt this as well). In addition, Windows stores each partition's UUID in a hidden, system-protected folder called "System Volume Information" at the root of all NTFS/exFAT/FAT32/VFAT filesystems.



    Sent from my SM-N960U using Tapatalk
    Continued...

    What you are seeing is a dropdown to an emergency recovery shell. This occurs when the system cannot boot normally.

    Log in to the recovery shell with the root account.

    Use the shell to diagnose and repair:
    #mount
    (Check the output to see if anything is mounted) you may see the temporary filesystem (tempfs) or the ramdisk as the only drive mounted. If you can see the "root" filesystem mounted successfully (on /), that's good, skip ahead to the *)

    If the root fs is not mounted, then you will need to fix that in grub.

    To do that, reboot, when you get to the grub bootloader (assuming that's what you're using), move the arrow on the keyboard to stop it from automatically booting. Select the main boot entry for linux and hit "e" on the keyboard to edit. You will see 2 lines at the end, one is the initrd and the other is linux... you should see the "set=root /UUID-blahblahblah / ro quiet" or something like that. That entry is incorrect.

    To fix it, you need to find the actual root location. Hit "ctrl-c" on the keyboard to open the command line. Type `ls' to show the drives and partitions. If you know what your root filesystem drive looks like (number of partitions), use context clues to try and figure out what your root partition may be. Otherwise continue typing `ls (sdX,gpt#)'. If you are not booting EFI, then it will be mbr not gpt, the X is the lowercase drive letter (ex. sdb<--) the # is the partition number. Don't type the `' but keep the (,) part.

    Sent from my SM-N960U using Tapatalk

  8. #7
    Quote Originally Posted by dbennett View Post
    Continued...

    What you are seeing is a dropdown to an emergency recovery shell. This occurs when the system cannot boot normally.

    Log in to the recovery shell with the root account.

    Use the shell to diagnose and repair:
    #mount
    (Check the output to see if anything is mounted) you may see the temporary filesystem (tempfs) or the ramdisk as the only drive mounted. If you can see the "root" filesystem mounted successfully (on /), that's good, skip ahead to the *)

    If the root fs is not mounted, then you will need to fix that in grub.

    To do that, reboot, when you get to the grub bootloader (assuming that's what you're using), move the arrow on the keyboard to stop it from automatically booting. Select the main boot entry for linux and hit "e" on the keyboard to edit. You will see 2 lines at the end, one is the initrd and the other is linux... you should see the "set=root /UUID-blahblahblah / ro quiet" or something like that. That entry is incorrect.

    To fix it, you need to find the actual root location. Hit "ctrl-c" on the keyboard to open the command line. Type `ls' to show the drives and partitions. If you know what your root filesystem drive looks like (number of partitions), use context clues to try and figure out what your root partition may be. Otherwise continue typing `ls (sdX,gpt#)'. If you are not booting EFI, then it will be mbr not gpt, the X is the lowercase drive letter (ex. sdb<--) the # is the partition number. Don't type the `' but keep the (,) part.

    Sent from my SM-N960U using Tapatalk
    Continued part 3...

    I need to split this up because the text disappears from my tapatalk app input after a certain length and I can't see what I'm writing...

    So keep typing 'ls (sdX,gpt#) and find all the ext4 filesystems (or JFS/XFS/BTRFS/EXT3... whatever filesystem you used... if you have a dual boot, NTFS or unknown partitions are Windows... an FAT/EFI partition is your bootloader partition. Note all linus filesystem locations.

    Now type `ls (sdX/gpt#)/' (fyi, the two most common ways to signify a command in linux instructions/man pages/help is via `command' or #command for a root shell and $command for a user shell- obviously follow each command by hitting enter).

    Keep doing this until you have found your linux installation root, while also taking notes of what other filesystems are. The root partition will have folders for mount points of etc, var, dev, usr,... it looks like your install is kind of complicated, so /Home (which will have folders similar to the user folder in windows: Downloads, Documents,...) /etc and maybe(?) /var and /usr (and possibly /usr/local) will all be on separate partitions. /etc will have a bunch of config files and folders inside of it (look for .rc files and .d directories as a teltale), a /usr partition can be identified by the presence of a "bin" and "local" folder. if /var is it's own mountpoint, then it will be the last ext filesystem you have (unless you have a /usr/local, in which case /var will have far more files than /usr/local). That should be it, and if you can't find something, no worries, it probably means it's part of the root fs.


    Sent from my SM-N960U using Tapatalk

  9. #8
    Quote Originally Posted by dbennett View Post
    Continued part 3...

    I need to split this up because the text disappears from my tapatalk app input after a certain length and I can't see what I'm writing...

    So keep typing 'ls (sdX,gpt#) and find all the ext4 filesystems (or JFS/XFS/BTRFS/EXT3... whatever filesystem you used... if you have a dual boot, NTFS or unknown partitions are Windows... an FAT/EFI partition is your bootloader partition. Note all linus filesystem locations.

    Now type `ls (sdX/gpt#)/' (fyi, the two most common ways to signify a command in linux instructions/man pages/help is via `command' or #command for a root shell and $command for a user shell- obviously follow each command by hitting enter).

    Keep doing this until you have found your linux installation root, while also taking notes of what other filesystems are. The root partition will have folders for mount points of etc, var, dev, usr,... it looks like your install is kind of complicated, so /Home (which will have folders similar to the user folder in windows: Downloads, Documents,...) /etc and maybe(?) /var and /usr (and possibly /usr/local) will all be on separate partitions. /etc will have a bunch of config files and folders inside of it (look for .rc files and .d directories as a teltale), a /usr partition can be identified by the presence of a "bin" and "local" folder. if /var is it's own mountpoint, then it will be the last ext filesystem you have (unless you have a /usr/local, in which case /var will have far more files than /usr/local). That should be it, and if you can't find something, no worries, it probably means it's part of the root fs.


    Sent from my SM-N960U using Tapatalk
    Part 4...

    So by now you know the locations of all your mount points. Make sure they're all written down.

    Hit "Esc" to return to the editing screen. There, replace all instances of the set=root /replace/ or root=/replace/ or root /replace/ with the I'd you just located was the root filesystem (exact format depends on grub version, you should be able to figure out what I mean, only replace the filesystem ID, not the "set=root" or any "root=" or anything else; so for example "set=root (sda,gpt2)/ if that was where you found root).

    Finally, replace the last line part where it says "ro quiet" with "rw" (don't touch ant other part of the line, also it may not say "quiet" in that case just change "ro" to "rw")

    Now boot, there's a 10% chance this will work off the bat (also a 10% chance you put the wrong ID and it won't boot at all, but if that's the case just reboot to reset the config and try again).

    Most likely you'll drop back to the same recovery shell. That's to be expected. Now again login with your root password and type `mount'

    You should see your root filesystem mounted at /. If not, type `mount /dev/sdX# /' where sdX# is the root filesystem you found in the previous step (note, for the linux OS, you don't put "(,)" or "gpt" it's condensed down to just the drive by letter ID and the partition number.)

    You should see this succeed and now you have your root mounted. Now you can type `cd /' to move to your root fs. Type `ls etc'. If the etc folder is empty, you'll need to mount it.

    Sent from my SM-N960U using Tapatalk

  10. #9
    Quote Originally Posted by dbennett View Post
    Part 4...

    So by now you know the locations of all your mount points. Make sure they're all written down.

    Hit "Esc" to return to the editing screen. There, replace all instances of the set=root /replace/ or root=/replace/ or root /replace/ with the I'd you just located was the root filesystem (exact format depends on grub version, you should be able to figure out what I mean, only replace the filesystem ID, not the "set=root" or any "root=" or anything else; so for example "set=root (sda,gpt2)/ if that was where you found root).

    Finally, replace the last line part where it says "ro quiet" with "rw" (don't touch ant other part of the line, also it may not say "quiet" in that case just change "ro" to "rw")

    Now boot, there's a 10% chance this will work off the bat (also a 10% chance you put the wrong ID and it won't boot at all, but if that's the case just reboot to reset the config and try again).

    Most likely you'll drop back to the same recovery shell. That's to be expected. Now again login with your root password and type `mount'

    You should see your root filesystem mounted at /. If not, type `mount /dev/sdX# /' where sdX# is the root filesystem you found in the previous step (note, for the linux OS, you don't put "(,)" or "gpt" it's condensed down to just the drive by letter ID and the partition number.)

    You should see this succeed and now you have your root mounted. Now you can type `cd /' to move to your root fs. Type `ls etc'. If the etc folder is empty, you'll need to mount it.

    Sent from my SM-N960U using Tapatalk
    *(start here if root was mounted in the first place) Part 5...

    So you should have found where /etc was back in grub. So mount it to the /etc folder the same way you mounted the root fs. `mount /dev/sdX# /etc'. (It is only in very rare, specific installations that /etc is its own partition- because it contains the automount information for all drives unless it is a highly modified distribution- and that's extremely rare, so it should have mounted ).

    No error? Beautiful! Now we need to change the boot IDs from their UUID's to their drive letter and partition number- which we identified in grub and wrote down.

    You boot mount info is located in /etc/fstab. So type `cat /boot/fstab' if it doesn't fit on the screen, try `cat /boot/fstab | more'. You should see all the filesystems that you found before, but identified by UUID. You're going to change that to the sdX# format for each drive. Hit "q" to escape the "more" reader if you used it. Now you need to figure out what editor the emergency shell has. Most have vim. vi may be easier for you so try that first. Type `vi /etc/fstab' if it says command not found, then try `vim /etc/fstab'. If that doesn't work, you probably have nano, type `nano /etc/fstab'.

    This will open the editor. CLI/shell text editors are not like regular text editors. They require a keyboard input to start a command like insert (to add/remove text). The exact commands vary by the editor. Either ctrl-h or simply hitting h off the bat usually opens a small help screen at the bottom showing the possible commands. Just remember the escape sequence and the save key sequence. Vi starts in insert mode, the rest do not.

    Sent from my SM-N960U using Tapatalk

  11. #10
    -->
    Quote Originally Posted by dbennett View Post
    *(start here if root was mounted in the first place) Part 5...

    So you should have found where /etc was back in grub. So mount it to the /etc folder the same way you mounted the root fs. `mount /dev/sdX# /etc'. (It is only in very rare, specific installations that /etc is its own partition- because it contains the automount information for all drives unless it is a highly modified distribution- and that's extremely rare, so it should have mounted ).

    No error? Beautiful! Now we need to change the boot IDs from their UUID's to their drive letter and partition number- which we identified in grub and wrote down.

    You boot mount info is located in /etc/fstab. So type `cat /boot/fstab' if it doesn't fit on the screen, try `cat /boot/fstab | more'. You should see all the filesystems that you found before, but identified by UUID. You're going to change that to the sdX# format for each drive. Hit "q" to escape the "more" reader if you used it. Now you need to figure out what editor the emergency shell has. Most have vim. vi may be easier for you so try that first. Type `vi /etc/fstab' if it says command not found, then try `vim /etc/fstab'. If that doesn't work, you probably have nano, type `nano /etc/fstab'.

    This will open the editor. CLI/shell text editors are not like regular text editors. They require a keyboard input to start a command like insert (to add/remove text). The exact commands vary by the editor. Either ctrl-h or simply hitting h off the bat usually opens a small help screen at the bottom showing the possible commands. Just remember the escape sequence and the save key sequence. Vi starts in insert mode, the rest do not.

    Sent from my SM-N960U using Tapatalk
    Part 6... I FORGOT TO MENTION BEFORE, TO BE SAFE, YOU SHOULD BACK UP FSTAB BEFORE EDITING. TO DO THIS TYPE `cp/etc/fstab /etc/fstab.old'

    YOU MAY BE VERY CONFUSED USING NANO, VIM OR EVEN VI, I SUGGEST YOU DO SOME READING ON HOW TO USE THEM FIRST OR YOU'LL BE VERY FRUSTRATED TRYING TO TYPE WITH IT.

    Once you are comfortable with the editor, go into insert mode, and replace the /dev/by-uuid/xxxx-yyyy-zzzz-etcetcetc for each mount point with the /dev/sdX# you found for it. Do this for all filesystems listed in fstab. You probably have a swap partition listed, don't worry about that for now, it may slow your next boot, but it shouldn't be necessary to boot.

    So for instance you'll see a line like:
    /dev/by-uuid/adcdef-12345-fedcba-54321 /Home rw

    Say you previously identified /Home to be located on (sda,gpt4) in grub, you would change the line to:

    /dev/sda4 /Home rw

    Make sure to leave any trailing blank lines at the end of the document and do not change the mount targets (like /Home) just change the mount points (like /dev/sda4). If there was an extra partition (besides the EFI/boot partition) that you found in grub on the same drive, you can try making that swap, otherwise, just wait until you boot into you desktop to worry about that.

    When you are done changing the mountpoints for all the filesystems, hit the escape sequence to exit input mode and then hit the sequence to save/overwrite and exit.

    Sent from my SM-N960U using Tapatalk

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •