Skip to main content
Topic: Mount USB drive during boot (Read 1903 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

Mount USB drive during boot

I got 2nd hand Lenovo m93p yesterday and I have installed Artix on it. I face one weird issue. I have SSD for system, this tiny PC doesn't have second any hard disk socket so I put bigger 2,5" HDD into AXAGO box and connected it via usb. Box is usb2 spec.
System doesn't mount it during boot.
Entry in fstab is correct. And I can mount it once system is up and running. But I want to mount it during boot without any manual interaction needed later from user.
In fstab I use "defaults,user,nofail" option.
mount -a doesn't report any issues
Linux user since 1997.
Red Hat -> Mandrake - > Arch - > Slackware -> Manjaro -> Artix / OpenBSD

Re: Mount USB drive during boot

Reply #1
I did not found a way to make it work.
In BSD it works fine.
I have "solved" it by allowing users mounting it and I have added a mount into .bashrc for autologin user.

Another weird thing with this PC and fresh Artix install. Xfce has some issues. After it boots up, no app opens when you click it's launcher. You have to log out and log in again.
I tried Openbox and Lxqt and didn't experience such behaviour.
Linux user since 1997.
Red Hat -> Mandrake - > Arch - > Slackware -> Manjaro -> Artix / OpenBSD


Re: Mount USB drive during boot

Reply #3
but I have it in fstab, still it doesn't mount.
BSD does it even without option "late", Linux doesn't do it on this particular machine.
I don't use option "x-systemd.device-timeout=1ms", does it work with OpenRC at all??? I use options nofail,user as described earlier.
Linux user since 1997.
Red Hat -> Mandrake - > Arch - > Slackware -> Manjaro -> Artix / OpenBSD

Re: Mount USB drive during boot

Reply #4
 What do you use to identify it in fstab? If I boot with a drive already attached it might be /dev/sda or /dev/sdb, the drive name in /dev can change. That wiki page said /dev/sdg1 which isn't the best way. Personally I like using the disk label, as I set it myself. Or use the UUID (but even that can change if you do some partition changes, although it won't change by itself.)

Re: Mount USB drive during boot

Reply #5
put here output from
Quote
cat /etc/fstab

Re: Mount USB drive during boot

Reply #6
I use UUID for everything.
My record for the device is as follows
UUID=418c9554-47f7-456e-babc-e11fa5bb85ba  /export      ext3    nofail,user 0 2
Linux user since 1997.
Red Hat -> Mandrake - > Arch - > Slackware -> Manjaro -> Artix / OpenBSD


Re: Mount USB drive during boot

Reply #8
I have the same issu, USB things are not mounted during boot.
My solution is to reboot only when necessary and only suspend my machine.

Re: Mount USB drive during boot

Reply #9
Perhaps:
Code: [Select]
$ lsblk
$ blkid
$ fdisk -l
could be helpful here too. I had no trouble mounting an external 2.5" HDD in a USB 2.0 enclosure from an /etc/fstab entry with OpenRC and booting up in both XFCE and Mate, in Mate I disabled automounting by the desktop first.
The partition I mounted was BTRFS not ext3 though:
UUID=etc-etc-etc  /home/me/mntdir      btrfs    nofail,user 0 2

Re: Mount USB drive during boot

Reply #10
Maybe we need some udev rule or something


Re: Mount USB drive during boot

Reply #12
so I pulled my external drive out of the drawer.
the record according to the fstab shown above
a ... mount failed :(

cat /var/log/rc.log :
Code: [Select]
mount: /home/test: can't find UUID=14E4473EE44720FA.
 * Some local filesystem failed to mount

and then I played  (modified) with my system a bit ....
and voila...
second reboot

cat /var/log/rc.log :

Code: [Select]
 * Mounting local filesystems ...
 [ ok ]

Re: Mount USB drive during boot

Reply #13
the  parameter "auto" must come to fstab:

Code: [Select]
PARTUUID=7db04321-01    /home/test      ntfs    auto,nofail     0       2

after boot i see:

Code: [Select]
sdb    8:16   0 465,8G  0 disk                                                              
└─sdb1
       8:17   0 419,2G  0 part /home/test ntfs         14E4473EE44720FA                     7db04321-01

be sure, that all necessary hooks are added  in your /etc/mkinitcpio.conf too:

Code: [Select]
 HOOKS=(base udev autodetect modconf block keymap consolefont filesystems keyboard fsck)