[SOLVED] Exec format error upon boot on fresh install on usb stick
Slackware - InstallationThis 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.
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.
post the command your using to boot the external drive with the boot-usb
What I did after selecting the boot-usb pertaining to that install in the firmware (bios) was to wait for syslinux to show up its boot prompt after leaving the firmware and then follow the instructions on the screen by pressing enter, which led to a kernel panic.
After reading your question I tried rootwait=30 at that prompt and instead of going into panic I got a new prompt after a message that no kernel could be found.
This is an external USB drive? It may be that the kernel needs a little more time to identify the device.
In other words, you need to add a "wait time" to the boot process.
It's easy: go through all the steps again to chroot into your installation, and when you get to the 'mkinitrd' step, add this parameter to get 5 seconds of boot delay: "-w 5". And continue with the remainder of your steps.
If 5 seconds are not making a difference, try 10 seconds delay (add "-w 10" to the mkinitrd commandline).
It's worth a try. Although I think your issue has a different root cause, but at least this way you can eliminate one possible root cause (or you may succeed, who knows).
Edit: I had not read all the way to the last post before I added mine, sorry. So a rootdelay is not solving it. Bummer.
The lack of a / (mount point?) in the second line of UUID's, caught my eye.
Should that read the word "none" actually be swap or have a "/" before the word none?
"none" is the correct "mount point" for a swap partition (since it doesn't actually mount to a location on the root filesystem). However, I believe the "sw" in the options section isn't a valid value and should probably be changed to "defaults". All that being said, an unmountable swap partition won't cause the issues seen here (they just wouldn't have swap if the partition can't be mounted).
@OP, I've skimmed through this thread for a bit, but I'm still a bit confused and want to clarify things. Please correct me on any incorrect points.
1. You ultimately intend on having Slackware 14.2 installed on a partition on your internal drive, not the USB device, correct?
2. Right now you're only able to boot Slackware if you use your external USB, but you intend on not requiring that and just using a bootloader installed to the internal drive to boot Slackware, right?
3. Do you want Slackware to use the same bootloader as the rest of your system allowing you to boot all distros via one menu or do you want to have Slackware use its own bootloader?
4. Are we now discussing two different computer systems and you're running into issues on both or is only one having issues now?
Thanks bassmadrigal for going through it. I am sorry it has become confusing in spite of my best efforts. I myself have trouble reviewing it. So, moving backwards:
Quote:
4. Are we now discussing two different computer systems and you're running into issues on both or is only one having issues now?
This thread was started to seek help installing my first Slackware on 32GB USB stick, in order to prepare myselft to installing in some of my Internal and external HDS and on one external SSD.
By the middle of the 20th post I was stuck on the usb-stick installation.
Lacking better ideas I tried installing to an USB external disk, and made a boot-usb-stick under the setup.
I was finally able to boot this through the very akwards procedure described in the second half of post #20 which involved the command below when boot was interrupted by a message (details @post #20) :
Code:
mount -o nosuid -t ext4 UUID=myuuid /mnt
This was not really satisfactory but provided me with courage to try an internal HD on my oldest machine (HP Probook) - which was first mentioned in post #25. In this machine I have not placed Slackware under its Grub yet, as I am not sure about how to deal with the problem - which I had in the install on the external HD when grub at its prompt listed my Slackware partition as (hd0,msdos2) but in the menu entries referred to it as (hd1,msdos2). I have not had the time to try it either. And I have that on lower prio as this time I am able to boot Slackware (in the internal hd of this HP Probook) from the boot-usb-stick. And it has been working very well.
I don't know whether I should spread my machines and devices in more than one threads. As part of my development I would like to answer all the unanswered questions, but i must concede that I am getting suspicious about the quality of usb-stick on which I first installed Slackware on - which was the origin of this thread. And I know that my Probook is not that realiable, since it is often impossible to boot from some usb-sticks, and always impossible from someothers
I hope Slackware to become my main system in all my machines, and I want to have it also on a pair of external HDs where I can keep less often used distros, so I don't have to spend endless hours configuring duplicate desktop-settings across my machines, which include a few macs. More on this below at "1-"
Quote:
3. Do you want Slackware to use the same bootloader as the rest of your system allowing you to boot all distros via one menu or do you want to have Slackware use its own bootloader?
I would feel most comfortable having Slackware booted from Grub(@MBR) which is what boots all my other systems, and Slackware Live has worked great that way.
Quote:
2. Right now you're only able to boot Slackware if you use your external USB, but you intend on not requiring that and just using a bootloader installed to the internal drive to boot Slackware, right?
Yes in the case of the internal HD in the Probook.
Fujitsu boots through that above mentioned magical incantation:
Code:
mount -o nosuid -t ext4 UUID=myuuid /mnt
Quote:
1. You ultimately intend on having Slackware 14.2 installed on a partition on your internal drive, not the USB device, correct?
Correct.
But I am used to have several USB sticks booting different Linux distros, which I use both for my own benefit in some special situations and also for making demonstrations to people that might get started with Linux. That include multiboots with ISOs and full or frugal installations. I am starting to move from USB-sticks to external disks, as a matter of economy, but I do have a number of sticks and they are easier to carry than most HDs i can afford, . So I would like to be able to be able to boot Slackware from usb-sticks if possible, but that is not a high priority.
That definitely helps paint a better picture of what's going on.
As far as installing Slackware to a USB device, my best suggestion would be to actually use Slackware Live, developed by Alien Bob. He has ready-made ISOs available for -current. If you do want them for 14.2, you would need to run his script to create them, as I don't believe they're being made or hosted anymore.
Unfortunately, I have basically no experience with grub and can't provide much guidance with it. However, reading through your post, it is very reminiscent of issues I've seen when devices change designation during boot (for example, on one boot, your main harddrive is /dev/sda, but on another boot, it becomes /dev/sdb and a thumbdrive becomes /dev/sda). With lilo and elilo, this issue is easily bypassed by using UUIDs in the configs, and I imagine that is possible with grub, but I couldn't tell you how. Another possibility might be that you're simply referencing the wrong location for files or don't have the proper initrd generated for your kernel version (if you're running the generic kernel). I know lilo will error (or at least warn) if the files aren't accessible, but it has no detection for mismatched initrds to kernels.
I think i am done now. Slackware has just booted from internal disk on my Probook, where it had first booted from the boot-usb-stick.
I booted from the DVD, chrooted, and ran
Code:
/usr/share/mkinitrd/mkinitrd_command_generator.sh
then ran mkinitrd exactly as output by the above command,
rebooted into the Arch Linux partition from where grub was installed to MBR and run
Code:
grub-mkconfig -o /boot/grub/grub.cfg
then rebooted into the Slackware partition in the HD and got a no-syncing kernel panic.
I checked the grub entry and it had not - as I had assumed it should have - a initrd line, something I had also experienced when I installed from Slackware Live into the same HD.
I added :
Code:
initrd /boot/initrd.gz
and since then I have been able to boot into Slackware without any boot stick and I have been running and enjoying it.
So I am ready to mark this thread as solved if that is the best for the community. I am however still very curious about the funny way I have been booting the external Hd and the difficulty in booting from a full (or eventually frugal) install on an usb-stick.
Before I tried to install Slackware, I used Slackware Live for a couple months on a usb live, on a Fujitsu Lifebook with Windows, where I have yet to dare shrinking a partition. I used it daily for most of my needs, and decided to try Slackware when i missed having Audacity and Rosegarden and thought it would be better to try that in the most conventional way.
I will certainly try full-installing Slackware Live to an usb stick, not that I need it when the iso version functions so well, but to compare to the problems I have had.
So my last question is should I mark this thread as solved and open a new one about the mysterious booting of my external HD ?????
Thanks all for the help. I would never make it without it.
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.
I have just found out that I had been unaware of the fact that I had got this tip from alekow and I want to thank for it as it was thanks to his method that I solved the question and was able to multiboot several machines from several distros from usb drivers.
This was a question that took me a lot of time (several momths) to learn how to handle in spite of many kind contributions so I felt I had to thank for it.
For those that may face the same problem I want to mention that I checked the lsmods of several different distros (most of my machines are multiboot) then placed the result in an Excel data sheet and based my mkinitrd attempts on that.
would have saved you a lot of time, as by default the generated initramfs includes all modules that could be needed on any machine of the same architecture.
dracut is not available on slackbuilds.org but you can get a package usable on Slackware64-15.0 in this repository, with sources for building the package here. This allows for instance to install Slackware on an USB stick or any other removable device and run it on another machine.
Last edited by Didier Spaier; 01-19-2023 at 02:01 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.