Page 1 of 6 123 ... LastLast
Results 1 to 10 of 55

Thread: Can't boot without commenting drive in /etc/fstab/

  1. #1

    Default Can't boot without commenting drive in /etc/fstab/

    I have my drive partitioned in two sets, the first the standard partition with /home / /boot etc. (see fdisk output), and the second partition is a just for media. I transferred a sizable video file (about 11GB) from /home (first partition) to /Media (second partition) everything went fine except when I rebooted the boot failed, it asked to login as root to debug (see pic). I also had a slightly different error asking me to use:
    Code:
    systemctl reboot
    Which did not fix my issue. I googled around and found that commenting certain drives out of /etc/fstab/ would fix the issue, it did for me, however now I cannot mount the drive due to it being absent from /etc/fstab/, uncommenting it breaks boot again.

    Fstab output:
    Code:
    Disk /dev/sda: 149.1 GiB, 160041885696 bytes, 312581808 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x3b31ea67
    
    Device     Boot     Start       End   Sectors   Size Id Type
    /dev/sda1  *         2048  58593279  58591232    28G 83 Linux
    /dev/sda2        58595326 312580095 253984770 121.1G  5 Extended
    /dev/sda5        58595328  66881535   8286208     4G 82 Linux swap / Solaris
    /dev/sda6        66883584 145006591  78123008  37.3G 83 Linux
    /dev/sda7       145008640 312580095 167571456  79.9G 83 Linux
    Link to image since it's too large to display: https://i.imgur.com/NqmOt00.jpg

  2. #2
    Join Date
    Dec 2008
    Location
    FL, USA
    Posts
    686

    Default Re: Can't boot without commenting drive in /etc/fstab/

    What does /etc/fstab contain?
    Reg. Linux User #211409 *** multibooting since 1992
    Primary: 42.3,TW,15.0 & 13.1 on Haswell w/ RAID
    Secondary: eComStation (OS/2) & 42.3 on 965P/Radeon
    Tertiary: TW,15.0,42.3,Fedora,Debian,others on Kaby Lake,Q45,Q43,G41,G3X,965G,Cedar,Caicos,GT218 &&&&

  3. #3
    Join Date
    Oct 2014
    Location
    Italy
    Posts
    1,456

    Default Re: Can't boot without commenting drive in /etc/fstab/

    From your description I cannot figure out what your setup is.
    Are you using just one or two (or more) drives?
    Which partitions are used as /root and /home and which is to be mounted as /Media?

    The error shown in the linked image refers to USB 7, port 2 not being enumerated for whatever reason: is this an USB drive? Is it the drive to be mounted as /Media?
    Please show
    Code:
    cat /etc/fstab
    and explain how it relates to the fdisk output in case that is not obvious (to us, I understand that it is pretty obvious to you )

    Apparently something is wrong with what is connected to USB7:2 and if that is a drive mentioned in fstab the system waits endlessly for it to show up before completing the boot process.
    Commenting it out (if that really is an USB disk) allows booting to finish.
    Generally speaking, you can mount anything without it being mentioned in fstab, it only doesn't get mounted automatically.
    Try the "mount" command ("man mount" for details) or your file manager.
    But if something was corrupt on that disk or if the connection cannot be set up for whatever reason, you cannot mount until you solve that problem.
    Main: Leap 15 Gnome on i7 4720HQ + Geforce GTX960M
    Test: Leap 42.3 (& others) on Core2Duo + GM965

  4. #4

    Default Re: Can't boot without commenting drive in /etc/fstab/

    It's one drive that is partitioned, here's fstab which I intended to include in the OP but omitted.

    Code:
    UUID=ddcfcfec-ae67-4a5b-b50e-838f0cb8793c  /                       btrfs  defaults                      0  0
    UUID=ddcfcfec-ae67-4a5b-b50e-838f0cb8793c  /var                    btrfs  subvol=/@/var                 0  0
    UUID=ddcfcfec-ae67-4a5b-b50e-838f0cb8793c  /usr/local              btrfs  subvol=/@/usr/local           0  0
    UUID=ddcfcfec-ae67-4a5b-b50e-838f0cb8793c  /tmp                    btrfs  subvol=/@/tmp                 0  0
    UUID=ddcfcfec-ae67-4a5b-b50e-838f0cb8793c  /srv                    btrfs  subvol=/@/srv                 0  0
    UUID=ddcfcfec-ae67-4a5b-b50e-838f0cb8793c  /root                   btrfs  subvol=/@/root                0  0
    UUID=ddcfcfec-ae67-4a5b-b50e-838f0cb8793c  /opt                    btrfs  subvol=/@/opt                 0  0
    UUID=5d75f431-14db-47c3-bd62-a25190ec3e0b  /home                   ext4   data=ordered,acl,user_xattr   0  2
    UUID=ddcfcfec-ae67-4a5b-b50e-838f0cb8793c  /boot/grub2/x86_64-efi  btrfs  subvol=/@/boot/grub2/x86_64-efi  0  0
    UUID=ddcfcfec-ae67-4a5b-b50e-838f0cb8793c  /boot/grub2/i386-pc     btrfs  subvol=/@/boot/grub2/i386-pc  0  0
    #UUID=36e0c062-6418-4472-a8a6-0ca7ed743f1d  /run/media/user/Media   ext4   defaults             0  0
    I included fdisk just to show how the partitions were setup, I don't know what USB has to do with it, I don't remember editing something of the sort. The only thing in /etc/fstab that I edited was adding the last line, and it has had no issues until now. Now if it were a corrupt file how would I go about solving it since I can't seem to mount the drive even with mount.

    Here's something I noticed, I tried mounting it as /dev/sda7 (as you would a USB) and it said:

    >Can't find in /etc/fstab

    I tried mounting it as /run/media/user/Media (gave the same error) and I noticed that media is not present in /run directory, that is /run/media/user/Media does not exist. This might probably be the problem, but what I don't understand is how it got deleted, since in my memory near everything in /run is owned by root?

    And if this really is the core issue, would just creating /media/user/Media again solve the problem, or even changing the path? Or are my files deleted?

    Thanks.

  5. #5

    Default Re: Can't boot without commenting drive in /etc/fstab/

    Quick follow up, I tried mounting the drive via GUI (Dolphin) and it displayed this message which seems to be more verbose and useful.


  6. #6
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    23,619

    Default Re: Can't boot without commenting drive in /etc/fstab/

    To begin with, you should not mount file systems in /run/media. That is for mounting spontanious added devices at run time for the desktop user.

    Better to choose a place either:
    • when this mount is for a particular user, the a directory soemewhere inside that users home directory (like /home/<username>/Media or whatever name the user likes);
    • when this mount is general for all users in the system, somewhere under /. In fact /mnt is specially for these cases, thus e.g. /mnt/Media would be nice.


    For the first case above, many people prefer to mount at e.g. /mnt/media and then let the user make a symbolic link in his home e.g.
    Code:
    ln -s /mnt/media Media
    ((the above assumeing that his working directory is his home direc tory at the moment of executing this).

    But that is a sidestep. Back to your problem:

    To find out what partition your fstab points at, please do
    Code:
    ls -l /dev/disk/by-uuid/*36e0c062-6418-4472-a8a6-0ca7ed743f1d*
    Henk van Velden

  7. #7

    Default Re: Can't boot without commenting drive in /etc/fstab/

    Quote Originally Posted by hcvv View Post
    To begin with, you should not mount file systems in /run/media. That is for mounting spontanious added devices at run time for the desktop user.

    Better to choose a place either:
    • when this mount is for a particular user, the a directory soemewhere inside that users home directory (like /home/<username>/Media or whatever name the user likes);
    • when this mount is general for all users in the system, somewhere under /. In fact /mnt is specially for these cases, thus e.g. /mnt/Media would be nice.


    For the first case above, many people prefer to mount at e.g. /mnt/media and then let the user make a symbolic link in his home e.g.
    Code:
    ln -s /mnt/media Media
    ((the above assumeing that his working directory is his home direc tory at the moment of executing this).

    But that is a sidestep. Back to your problem:

    To find out what partition your fstab points at, please do
    Code:
    ls -l /dev/disk/by-uuid/*36e0c062-6418-4472-a8a6-0ca7ed743f1d*
    I don't remember setting the partition in /run/media, that partition is there since my previous debian install, I believe it was added there automatically, I noticed it was different from debian's /mnt, but I assumed openSUSE differed.

    I get
    Code:
    lrwxrwxrwx 1 root root 10 Jul 17 10:51 /dev/disk/by-uuid/36e0c062-6418-4472-a8a6-0ca7ed743f1d -> ../../sda7
    When executing the command you suggested.

  8. #8
    Join Date
    Dec 2008
    Location
    FL, USA
    Posts
    686

    Default Re: Can't boot without commenting drive in /etc/fstab/

    Try running top in an Xterm, then plug in the USB drive. Does it report connection as sdb, or as something else, like sdf or sdg, like some of mine do, depending into which port it's plugged?

    Try changing
    Code:
    #UUID=36e0c062-6418-4472-a8a6-0ca7ed743f1d /run/media/user/Media ext4 defaults 0 0
    to
    Code:
    UUID=36e0c062-6418-4472-a8a6-0ca7ed743f1d /home/xtrnlDATA ext4 nofail 0 0
    If successful, do as HCVV wrote:
    Code:
    mkdir /home/xtrnlDATA; mkdir /home/user/xtrnlData; ln -s /home/xtrnlDATA /home/xtrnlData
    UUIDs are easy for computers to use, but not for people. So, instead of above, or as a learning exercise, use a unique volume label you create and can remember for each partition on the USB disk. Create one if one doesn't already exist, (following examples presume the USB disk is sdb and contains only a single partition):
    Code:
    tune2fs -L xtrnlData /dev/sdb1
    or (using same sdb/single assumption), do:
    Code:
    e2label /dev/sdb1 xtrnlDATA
    or use YaST2 partitioner. Then use this in fstab
    Code:
    LABEL=xtrnlData /home/xtrnlData ext4 nofail 0 0
    Various means exist to discover if an EXT4 filesystem has a label, e.g.:
    Code:
    blkid /dev/sdb1
    or
    Code:
    e2label /dev/sdb1
    Reg. Linux User #211409 *** multibooting since 1992
    Primary: 42.3,TW,15.0 & 13.1 on Haswell w/ RAID
    Secondary: eComStation (OS/2) & 42.3 on 965P/Radeon
    Tertiary: TW,15.0,42.3,Fedora,Debian,others on Kaby Lake,Q45,Q43,G41,G3X,965G,Cedar,Caicos,GT218 &&&&

  9. #9
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    23,619

    Default Re: Can't boot without commenting drive in /etc/fstab/

    Thus indeed that UUID refers to /dev/sda7.

    Now we have to find out why you have problems mounting it.

    Try
    Code:
    mount -t ext4 /dev/sda7 /mnt
    and show that here.

    In the mean time you could try to explain a bit better about your first post, because (I am sorry to say) in contains a lot of not understandable and unexplained items.
    E.g. you say "I transferred a sizable video file (about 11GB) from /home (first partition) to /Media (second partition)..." Now, apart from your misnomers about "first" and "second" partition, how did you transfer?
    Please remember that using words that have only a general meaning do not inform others about the ways you exactly did things.
    Henk van Velden

  10. #10
    Join Date
    Oct 2014
    Location
    Italy
    Posts
    1,456

    Default Re: Can't boot without commenting drive in /etc/fstab/

    Quote Originally Posted by Quads View Post
    Quick follow up, I tried mounting the drive via GUI (Dolphin) and it displayed this message which seems to be more verbose and useful.

    The ext4 filesystem on /dev/sda7 doesn't seem to be in good shape ("can't read superblock on /dev/sda7").
    Try running the following as superuser (root) to see what is going on (/dev/sda7 should be unmounted for meaningful results):
    Code:
    e2fsck -f -n /dev/sda7
    Main: Leap 15 Gnome on i7 4720HQ + Geforce GTX960M
    Test: Leap 42.3 (& others) on Core2Duo + GM965

Page 1 of 6 123 ... LastLast

Posting Permissions

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