LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Booting USB hard drive on UEFI machine in legacy mode (https://www.linuxquestions.org/questions/slackware-14/booting-usb-hard-drive-on-uefi-machine-in-legacy-mode-4175620794/)

aikempshall 01-03-2018 10:39 AM

Booting USB hard drive on UEFI machine in legacy mode
 
I'm having problems booting Slackware 14.2 installed on a USB drive for a Dell laptop.

I've been booting external USB drives with Slackware installed since about 2002. There's been problems along the way but this one has me at a loss about what to do to fix it.

Current situation is that I have a Dell laptop that successfully boots Slackware 14.1 installed on USB hard drive irrespective of whether it's 32bit or 64bit. So I know the procedure I'm following is correct it's just I can't seem to get the right mix of modules to load in my initrd.

For 14.1, which boots successfully, the load_kernel_modules in /boot/initrd.gz is

Quote:

modprobe -v usb-storage
modprobe -v xhci-hcd
modprobe -v ehci-hcd
modprobe -v ehci-pci
modprobe -v uhci-hcd

For 14.2, boot fails, mkinitrd_command_generator.sh suggests these modules -

Quote:

modprobe -v mbcache
modprobe -v jbd2
modprobe -v ext4
modprobe -v usb-storage
modprobe -v xhci-hcd
With this initrd.gz I get failures along the lines of

Quote:

could not insert 'mbcache': Exec format error
could not insert 'jbd2': Exec format error
could not insert 'ext4': Exec format error
it then fails big time with

Quote:

mount can't find /mnt/ in /etc/fstab

Any suggestions on how to proceed?

Alex

keefaz 01-03-2018 12:09 PM

I would try vmlinuz huge without initrd, then after boot, on running system I'd try to make the initrd

username_11011 01-04-2018 03:59 PM

What the ...?? Maybe you're trying to load 32-bit modules with a 64-bit kernel (or vice versa??) I've run 32-bit binaries with 64-bit Slackware kernels using Alien Bob's library. Are you doing this with the kernel modules themselves? I need more information.

aikempshall 01-05-2018 12:50 AM

Quote:

Originally Posted by keefaz (Post 5801179)
I would try vmlinuz huge without initrd, then after boot, on running system I'd try to make the initrd

I've got Slackware installed on a External USB hard drive so I have to use an initrd.

aikempshall 01-05-2018 12:54 AM

Quote:

Originally Posted by username_11011 (Post 5802002)
What the ...?? Maybe you're trying to load 32-bit modules with a 64-bit kernel (or vice versa??) I've run 32-bit binaries with 64-bit Slackware kernels using Alien Bob's library. Are you doing this with the kernel modules themselves? I need more information.

I'm using the 64 bit install disk and haven't introduced Alien Bob's Libray. I have seen somewhere else, on this forum, about the "Exec format error" problem, I'm sure that an explanation came back to say that these things happens i.e. mixing 32-bit binaries with 64-bit modules. Can't see how though.

aikempshall 01-05-2018 01:04 AM

Anyway, I decided to ignore the kind suggestion from mkinitrd_command_generator.sh. Not for the first time, I also ignored it back in 2014 when I migrated from 13.37 to 14.1.

What I did was just prior to going into chroot do an lsmod to inspect what modules had been loaded during the install phase. I decided to stick with ext4 as I felt I would definitely need that.

What i came up with was

Code:

mkinitrd -c -k ${_KERNEL} -f ext4 -r ${__UUID} -m ext4:usb-storage:ehci-pci:xhci-pci -u -w 10 -o /boot/initrd.gz
Which got me an system installed on an external USB disk that boots successfully on the laptop and also on a desktop with a lot more disks.

Thanks

Alex


All times are GMT -5. The time now is 04:34 PM.