Slackware - Installation This forum is for the discussion of installation issues with Slackware. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
02-01-2021, 04:53 PM
|
#1
|
Member
Registered: Dec 2019
Location: Sweden
Posts: 312
Rep: 
|
Exec format error upon boot on fresh install on usb stick
Hi!
I have just installed - for the first time, and after many many mistakes, my first Slackware - 14.2 64 (stable)on a San Disk Cruiser usb stick, through my Fujitsu Esprimo E7935, with a Corel2 Duo E8500 , 8 Gb ram, from a DVD burned from an iso downloaded last week.
I did this after using Slackware LIve (Mate) in 2 of my computers, for most of my everyday needs, for a couple months.
Immediately upon concluding the installation - having chosen not to install lilo - and exiting setup i did:
1 - chroot /mnt
2- ran mkinitrd -c -k 4.4.14 -m ext4 -f ext4 -r /dev/sdb3
got a message that modules jbd2.ko,mbcache.ko and a third one (maybe ext4?) had been added
3- grub-install --target=i386-pc -dev-sdb
got "no errors"
4- added > GRUB_DISABLE_OS_PROBE=true < to /etc/default/grub
5- ran lsblk and checked that none of the partitions in the computer's HD were mounted
6 - ran grub-mkconfig -o /boot/grub/grub.cfg and got a message that confirmed presence of initrd and, surprisingly to me, of some of the OSes installed on my hd, and the error message which I enclose as a .jpeg file.
Searching the forums site I found a reference by Richard Cranium @ https://www.linuxquestions.org/quest...ab-4175583059/ :
"You should bind /sys, /dev, and /proc to /mnt/tmp/sys, /mnt/tmp/dev, and /mnt/tmp/proc prior to the chroot, while you're at it."
Which I did not do,as I was following https://mirrors.dotsrc.org/slackware.../README.initrd where there is no mentioning of any binding and so I assumed,maybe wrongly, that chroot would be like arch-chroot in ArchLinux, where one does no explicit binding, if I am not mistaken. Can this be the mistake I must correct ?
Or can it be that I need to add a specific (usb ?) mode to initrd in order to be able to boot from the usb stick into which Slackware was installed?
Maybe both?
|
|
|
02-01-2021, 07:55 PM
|
#2
|
LQ Veteran
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,844
|
The exec format error is normal when using an initrd with the huge kernel. What do you have for a root= on the linux line of your grub.cfg? The other thought is you don't have usb modules and/or other modules in your initrd needed to access the file system on the usb.
|
|
1 members found this post helpful.
|
02-02-2021, 08:15 AM
|
#3
|
Member
Registered: Dec 2019
Location: Sweden
Posts: 312
Original Poster
Rep: 
|
Thanks for your answer colorpurple21859.
grub-mkconfig has placed several entries in grub.cfg, with respective following linux lines:
linux /boot/vmlinuz-huge-4.4.14 root=UUID=10515910-9616-437b-8629-90b56c474c6d ro
linux /boot/vmlinuz-huge-4.4.14 root=UUID=10515910-9616-437b-8629-90b56c474c6d ro single
linux /boot/vmlinuz-huge root=UUID=10515910-9616-437b-8629-90b56c474c6d ro
linux /boot/vmlinuz-huge root=UUID=10515910-9616-437b-8629-90b56c474c6d ro single
linux /boot/vmlinuz-generic-4.4.14 root=UUID=10515910-9616-437b-8629-90b56c474c6d ro
linux /boot/vmlinuz-generic-4.4.14 root=UUID=10515910-9616-437b-8629-90b56c474c6d ro single
linux /boot/vmlinuz-generic root=UUID=10515910-9616-437b-8629-90b56c474c6d ro
linux /boot/vmlinuz-generic root=UUID=10515910-9616-437b-8629-90b56c474c6d ro single
I tried all of them with the same error as result.
Then I thought of what you wrote and tried the first one without the initrd line and then got a panic screen of which I enclose a picture.
|
|
|
02-02-2021, 08:24 AM
|
#4
|
LQ Veteran
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,844
|
Is the /etc/fstab using /dev/??? or uuids?
|
|
1 members found this post helpful.
|
02-02-2021, 08:26 AM
|
#5
|
Member
Registered: Sep 2009
Distribution: Slackware
Posts: 236
Rep:
|
Hi,
On a usb install you want to add additional modules to your initrd - usb-storage will be one of them. To check if you need more you could use lsmod on a working installation to see which modules are loaded after plugging in the device.
Also add rootwait kernel parameter to your bootloader - rootwait=5 works for me on an external usb3 M.2 enclosure.
If you are thinking of using your usb drive on multiple machines you need to use persistent partition naming, ie. edit your /etc/fstab to use LABEL= or UUID= rather then device names and change your root parameter in bootloader config file to use one of these as well.
Regards,
Alex
|
|
1 members found this post helpful.
|
02-02-2021, 01:45 PM
|
#6
|
Member
Registered: Dec 2019
Location: Sweden
Posts: 312
Original Poster
Rep: 
|
thanks again colorpurple21859 !
I think you have put a finger on something: lsblk lists no uuid - neither for the usb nor for the multiple partitions in the HD and folder /dev has no folder /disks. I suppose these means the system is on UDEV - I have really no idea as I have never interacted with udev.
Should I edit the grub.cfg (40_custom?) and use root=/dev/sdb3 - which is what lsblk reports ?
|
|
|
02-02-2021, 02:03 PM
|
#7
|
Member
Registered: Dec 2019
Location: Sweden
Posts: 312
Original Poster
Rep: 
|
Thanks alekow for very interesting info!
Quote:
On a usb install you want to add additional modules to your initrd - usb-storage will be one of them. To check if you need more you could use lsmod on a working installation to see which modules are loaded after plugging in the device.
Also add rootwait kernel parameter to your bootloader - rootwait=5 works for me on an external usb3 M.2 enclosure.
If you are thinking of using your usb drive on multiple machines you need to use persistent partition naming, ie. edit your /etc/fstab to use LABEL= or UUID= rather then device names and change your root parameter in bootloader config file to use one of these as well.
|
I have no questions (now, after your answer) on modules and rootwait, but although this usb is mostly a test before I attempt to install on my HD, it would be nice to carry it around in case I want to use it when I am away from my machines. As colorpurple28159 pointed out my system seems to be running on udev, and I have unfortunately not set the partition'ś label.
I suppose i can set its label if I can chroot to the usb stick, but i have seen different instructions on how to chroot. Is it enough to chroot to where I have mounted the partition or must I bind mount some critical folders before, if I may ask it here?
|
|
|
02-02-2021, 02:39 PM
|
#8
|
LQ Veteran
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,844
|
When you first boot the usb at the grub menu, press e to edit and add rootdelay=15 to the end of the linux line
F10 or ctrl-x to boot
post the contents of your /etc/fstab that is on the usb.
Last edited by colorpurple21859; 02-03-2021 at 02:02 PM.
|
|
|
02-02-2021, 03:06 PM
|
#9
|
LQ Veteran
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,844
|
add these modules to your initrd if the rootdelay doesn't work
Code:
mkinitrd -c -k 4.4.14 -m ext4:usbcore:sd_mod:ehci_hcd:uhci_hcd:ohci_hcd:usb_storage:scsi_mod -f ext4 -r /dev/sdb3
|
|
|
02-02-2021, 03:40 PM
|
#10
|
Member
Registered: Sep 2009
Distribution: Slackware
Posts: 236
Rep:
|
Quote:
Originally Posted by fredmyra
lsblk lists no uuid - neither for the usb nor for the multiple partitions in the HD and folder /dev has no folder /disks.
|
How are you checking that? After chrooting to your installation? If that is the case that is what binding the /dev directory is for.
Issuing command
Code:
mount -o bind /dev /your/chroot/dir/dev
will give you access to devices.
Quote:
I suppose i can set its label if I can chroot to the usb stick
|
You could, but you might use UUID as well. No need to set anything. Also you don't need to chroot to get your UUIDs or set LABEL - you could do both from any live CD/USB which you have probably been using to chroot anyway.
Quote:
but i have seen different instructions on how to chroot. Is it enough to chroot to where I have mounted the partition or must I bind mount some critical folders before, if I may ask it here?
|
If you want to interact with disks you want a working /dev directory. I normally just bind /dev, /sys and /proc to have a full working system just in case.
I think you will find that you need to do what colorpurple21859 said:
Quote:
Code:
mkinitrd -c -k 4.4.14 -m ext4:usbcore:sd_mod:ehci_hcd:uhci_hcd:ohci_hcd:usb_storage:scsi_mod -f ext4 -r /dev/sdb3
|
and set /etc/fstab to UUID or LABEL.
Hopefully it will all work after that.
------------------------------------------
EDIT:
And rootwait parameter will be needed too of course.
Last edited by alekow; 02-02-2021 at 03:44 PM.
|
|
|
02-02-2021, 04:44 PM
|
#11
|
Member
Registered: Dec 2019
Location: Sweden
Posts: 312
Original Poster
Rep: 
|
here is (attached) the fstab on the usb.
I guess I will have to edit it and delete the line for /dev/sda9 if I want to use the stick in other computers.
I'ĺl need a couple days before I can try out your suggestions, which sound great.
|
|
|
02-02-2021, 04:56 PM
|
#12
|
Member
Registered: Dec 2019
Location: Sweden
Posts: 312
Original Poster
Rep: 
|
@ alekow
Quote:
How are you checking that? After chrooting to your installation?
|
Booted from Manjaro on HD, did:
mount /dev/sdb3 /mnt
ls /mnt/dev
lsblk
nothing else, i.e. no chroot nor any bind mounting.
|
|
|
02-02-2021, 05:10 PM
|
#13
|
LQ Veteran
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,844
|
In the fstab change the /dev/sdb? to UUID=<uuid of partition>
delete the /dev/sda9 swap line. The system may boot by just editing the fstab.
to chroot into the system to rerun mkinitrd, reinstall grub other things
Code:
mount /dev/sdb3 /mnt
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
mount -o bind /run /mnt/run
chroot /mnt
This is the two liner version:
Code:
mount /dev/sdb3 /mnt
for i in sys run proc dev ; do mount --bind /$i /mnt/$i; done
Last edited by colorpurple21859; 02-02-2021 at 05:23 PM.
|
|
1 members found this post helpful.
|
02-02-2021, 05:20 PM
|
#14
|
Member
Registered: Sep 2009
Distribution: Slackware
Posts: 236
Rep:
|
Quote:
Originally Posted by fredmyra
I guess I will have to edit it and delete the line for /dev/sda9 if I want to use the stick in other computers.
|
Sounds about right!
Quote:
Originally Posted by fredmyra
|
Well no wonder you can't see any devices. There is no device tree mounted there. Try listing your devices under Manjaro with the USB attached - same machine, same drives = same UUID's. So:
Code:
ls -l /dev/disk/by-uuid
|
|
1 members found this post helpful.
|
02-03-2021, 08:04 AM
|
#15
|
Member
Registered: Dec 2019
Location: Sweden
Posts: 312
Original Poster
Rep: 
|
I just couldn't wait, so I did:
1 - Booted from DvD
2 - mount /dev/sdb3 /mnt
3 - Edited fstab and replaced /dev/sdb3 with UUID=(uuid number for that partition)
4 - bin-mounted exactly as recommended (with one-liner)
5 - chroot /mnt
6 - ran mkinitrd exactly as prescribed
7 - grub-mkconfig -o /boot/grub/grub.cfg
which again found several OSes in my Hard drive, besides the stuff in the usb, in spite of none of those being mounted and GRUB_DISABLE_OS_PROBE=true in (from chroot) etc/default/grub.
But this time it reported more OSes in the hard drive than the absolute first time i ran grub-mkconfig at the beguining of this thread. Also, this time it reported - for first time - that all those partitions had an unknown file system.
8 - exited, -l-unmounted the bin-mounted stuff and rebooted
And Oh! it went so swift trough booting beyond the format exec error.
I got a new error>
"Mount: can't find /mnt in fstab" - little more detail attached, but still, this feels like GREAT progress to me."
I have used the word "exactly" above because I repeated the whole procedure above, to be sure, and was VERY carefully both times. But knowing myself I know I can never be 100% sure.
Should I close this as solved and eventually take up the new error in another thread?
I am googling on it right now, and maybe I should put some more time of my own now, before I ask for more of yours.
Many thanks for AMAZING support !
|
|
|
All times are GMT -5. The time now is 03:31 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|