LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation
User Name
Password
Slackware - Installation This forum is for the discussion of installation issues with Slackware.

Notices


Reply
  Search this Thread
Old 03-30-2022, 01:07 PM   #1
fredmyra
Member
 
Registered: Dec 2019
Location: Sweden
Posts: 295

Rep: Reputation: Disabled
How I was finally able to boot from a stubborn external USB Hard disk


Obs. to moderators: I am not sure if this is the right place for this kind of content and I not sure whether this is welcome content either. Please feel free to nuke it if improper or to remove this obs. otherwise.

I am posting this with the thought of helping anyone suffering from the same problem that motivated my thread https://www.linuxquestions.org/quest...ck-4175689683/

What I am sharing here is the strategy I used in dealing with my doubts and limitations in following the excellent advice I have found in this forum.

I am not trying to give instructions, first because I am myself still a beginner, but mainly because one will find those from real experts in the above mentioned thread an in others like https://www.linuxquestions.org/quest...ng-4175606002/

It turned out this was not a very difficult problem in itself as far as principles were concerned. The problem was to identify the right parameters for my case.

I got many hints that the way to go was to make a decent initrd, which includes a root delay for booting (like "-w 15") and make sure to use the UUID of my external USB disk in my corrected configured fstab, and in the making of initrd. Some suggested to name my initrd (when issuing the mkinitrd command) with a name that matches the kernel to be booted. It proved to work in my case. But the the little word "decent" above was the problem I somehow could not get right. The initrd made from the recommendation by /usr/share/mkinitrd/mkinitrd_command_generator.sh worked neither with huge nor with generic. Probably due to the formatting of my external USB hard disk which can boot from both Bios och UEFI modes.

So I finally took the time to make a datasheet with the modules in the OSes installed on that external USB disk - (it is a multidistro).

I went through all modules I found in the "/lib/modules/$(uname -r)/modules.dep" and the "/lib/modules/$(uname -r)/modules.builtin", of all OSes and of the Slackware usb-installer, as well as the list provided by their respective lsmod commands. I dismissed those that to me seemed obviously not connected with finding the root in my external disk, and made sure that I included all that I found could be relevant to finding it.

Yes it was guess work, but I did not find it too difficult, and I am a beginner. I took risks, of course, in not including some I was not sure about as well as in including some I was also not sure about. But they did not worry me much, as I knew I could always go back and make a more inclusive list.

I then made a datasheet with the information gathered above and marked Slackware modules that were "built-in" in Slackware as green.

Those which were ".deps" already present in the installing USB-stick's lsmod output were marked as blue.

Those that were not "builtin" in my Slackware and those that were not present in the output of lsmod run from the Slackware64_15.0 usb-installer from which I was going to make my initrd were marked red.

The rest, i.e. those I was not considering to use, were left unmarked.

ext4, jbd and mb cache were little special. I understood they were builtin, but after getting so many error messages about not being able to load them I decided to make sure they were included in the initrd. I know now that the messages meant that they could not be loaded because they were already builtin, but in my fears and doubts I let them go into my initrd. I know now that several of the modules I have in my initrd elicit similar messages when I boot. So it would be a good idea to clean up the initrd a bit and then trying also for a shorter root delay. But I think I can do that when (and if) I succeed to make a working initrd for the generic kernel.

I am enclosing the datasheet, as its lay-out encouraged me to select the set of modules .i.e. the blues and those reds that were available in Slackware. Fujitsu-laptop, for example was not. Unfortunately the pdf export broke it up a bit and its visual effect (which played a big role for my inspiration regarding selection of modules) was partially lost.

I then made my initrd in the way suggested in the referred threads above - (thanks you all who provided such fine support) - making sure it included:
a) "-w 20" for the root delay - knowing I could always test this to lower, or at worst increase this value;
b) identification of the external disk as UUID;
c) a name for my initrd in the format <initrd-huge-5.15.19.gz> to match my kernel.

I did avoid, as recommended somewhere (can't find the reference right now, will try to post it later if I find it), specifying my root in the grub linux line grub, as it was already included in the initrd.

I then rebooted into Manjaro and updated its grub (it IS a multidistro !)

That gave me 11 menu entries for Slackware, computed by grub from combinatons of the 2 kernels vmlinuz-generic-5.15.19 and vmlinuz-huge-5.15.19 with 3 initrds:the original initrd.gz,and two I made: initrd_5.15.19 and initrd-huge-5.15.19. All in /boot of course.

In my (13 months old) despair with the struggle for a boot I forgot to delete or at least move away the two older initrds so as to guarantee a shorter grub section for Slackware. Which cost me several failures before I finally found out there was one entry that boots Slackware nice and swiftly.

My lack of experience made it difficult to read and sort out all the possibilities and I started trying editing entries according to my own hypothesis (and fears) which lead to enormous waste of time.

I register this here hoping to save other newbies from a similar fate.

I will now start looking into making an initrd for generic kernel. I have not tried booting with this initrd from generic yet.

I know that initrd is not to be used with huge kernel, but having had all the problems I had and having found references to it occasionally being advisable to do I followed this way. It is difficult for newbies to avoid risks.

Hope this can help someone sometime. Corrections welcome.
Attached Files
File Type: pdf INITRD_multitable_lsmod_sorterad.pdf (45.7 KB, 37 views)

Last edited by fredmyra; 03-30-2022 at 01:46 PM. Reason: Correct Title, typos
 
Old 03-31-2022, 01:24 PM   #2
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,651
Blog Entries: 19

Rep: Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480Reputation: 4480
With a bit of editing, this could go into the wiki Tips and Tricks section. Better than putting it into a thread where it gradually disappears.
 
1 members found this post helpful.
Old 04-02-2022, 01:00 PM   #3
fredmyra
Member
 
Registered: Dec 2019
Location: Sweden
Posts: 295

Original Poster
Rep: Reputation: Disabled
@ hazel
Thanks for your comment. I will look into the wiki I see whether I can fix it and post it.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Which External Hard disk 1 TB suitable to transfer or copy file from Linux Fedora 8 OS ? The following External Hard Disk wil be suitable RAJIB BNG Linux - Hardware 2 09-23-2017 02:12 AM
[SOLVED] Stubborn packages, not able to remove abhisheks77 Linux - Server 2 05-12-2014 07:48 PM
Copy of IBM Server hard disk data to Another USB External Hard disk mazharcdn Linux - Server 2 09-02-2009 12:41 AM
60GB laptop hard disk & 200GB external USB hard disk linux compatibility powah Linux - Hardware 0 03-07-2006 10:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation

All times are GMT -5. The time now is 10:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration