slackware-current install on USB - .. can't find /mnt in /etc/fstab
slackware64-current (16. 3. 2020)
install on USB disk As kernel do not have compiled in USB devices, I created initrd. Suggested by mkinitrd_command_generator.sh do not include USB modules: Code:
mkinitrd -c -k 5.4.25 -f ext4 -r "UUID=202a8463-30c8-4806-8631-02a54da3090b" -m usb-storage:xhci-hcd:jbd2:mbcache:crc32c_intel:crc32c_generic:ext4 -u -o /boot/initrd.gz Quote:
So I created own code, I used years ago: Code:
mkinitrd -c -k 5.4.25 -f ext4 -r UUID=202a8463-30c8-4806-8631-02a54da3090b -m usb-storage:xhci-hcd:xhci-pci:ohci-pci:ehci-pci:uhci-hcd:ehci-hcd:hid:usbhid:i2c-hid:hid_generic:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:jbd2:mbcache:crc32c_intel:crc32c_generic:ext4 -u -o /boot/initrd.gz /etc/fstab line for mount root partition: Code:
PARTUUID=fe50e8fe-01 / ext4 defaults 1 1 Code:
append=" root=PARTUUID=fe50e8fe-01 " Code:
image = /boot/vmlinuz Now at boot from USB disk ends with: Quote:
Code:
mount -o ro -t ext4 /dev/sda1 /mnt All works including KDE. Have tried many versions in fstab and lilo.conf - naming of boot partition by PARTUUID, by /dev/sdXX. None works. How to permanently solve that problem? |
:twocents: booting from usb maybe it is useful to add -w 5 option,
it will wait for five seconds to usb devices be ready. Also my modules line is a little bit different, but I think jbd2 and mbcache aren't needed, with ext4 on the list they will be added automatically. |
Thanks.
Not sure will help, but where to put -w 5 option? Lilo? Please post exact line and in which script. Regarding modules in a mkinitrd: /boot/initrd-tree/modules.dep: Code:
kernel/fs/ext4/ext4.ko: kernel/fs/mbcache.ko kernel/fs/jbd2/jbd2.ko Code:
CONFIG_EXT4_FS=y So default Slackware huge kernel have built in ext4 AND also module (found in a installed /lib/modules) |
https://docs.slackware.com/howtos:sl...sistent_naming
hi, to build the initrd.gz you use Code:
UUID=202a8463-30c8-4806-8631-02a54da3090b Code:
append=" root=PARTUUID=fe50e8fe-01 " |
Quote:
|
sorry, i meant use UUID instead of PARTUUID in your lilo configuration
|
I don't think that lilo.conf accepts a naming by PARTUUID (partition's UUID). Try with UUID (file system's UUID) instead.
Also, what says "lilo -t"? |
Quote:
An what else can I use to define USB disk by ID instead of /dev/SDXX. In append parameter of lilo.config? |
the below should give you a list of the connected drives UUID - including usb -
Code:
ls -la /dev/disk/by* this is the UUID syntax for your lilo.conf Code:
root=<root-device> |
Quote:
Code:
mkinitrd -c -k 5.4.25 -w 5 -f ext4 ...etc When I run mkinitrd with a module list like '-m ext4:jbd2:mbcache' the output shows jbd2 and mbcache being added twice, I think this isn't a problem, but I always run '-m ext4' and it works. If you run the huge kernel there isn't need of adding ext4 to the initrd, as you wrote it is in the kernel. My experience running Slackware from a usb disk it that even the huge kernel needs the usb modules to boot. This is from some years ago so maybe that changed, I don't know. I found my mkinitrd command line to boot from usb. Code:
-m ext4:xhci-pci:xhci-plat-hcd:usb-storage:ehci-pci:ehci-platform:ohci-pci:ohci-platform ehci-pci and ehci-platform are for USB 2 ohci-pci and ohci-platform are for USB 1.1 |
Paulo2 many thanks for the help!
A key was -w 5 in a mkinitrd script! All other options were correct all the time. Years ago, when I did that I used SSD disk, now I tested with spare old hard disk. So at a past there was no need to use -w, with that old disk it is a must. |
The complete manual for creating initrd in /boot after installing slackware from media:
Needed procedure when booting installed slackware from a USB device. DO NOT reboot after slackware install in a USB disk, instead follow this manual. Installed Slackware from a USB disk - no kernel USB drivers in kernel, only modules replace ALL occurrences of a partition names /dev/.. with PARTUUID get by blkid /etc/fstab: Quote:
lilo.conf general part: Quote:
Bootable partition part: Quote:
After booting with the install stick, open two terms (with CTRL-ALT-F1 and CTRL-ALT-F2). use the first terminal to mount partitions properly, e.g. : Quote:
Quote:
Quote:
Quote:
Replace kernel number accordingly. run lilo: Quote:
-b /dev/sdb - disk, not partition! reboot |
All times are GMT -5. The time now is 11:29 PM. |