LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 04-20-2006, 06:18 PM   #1
tICT
LQ Newbie
 
Registered: Apr 2006
Location: Ilkley, UK
Posts: 3

Rep: Reputation: 0
Help with mkinitrd for 10.2 Slackware Install to USB HDD


Am wanting to install 10.2 to a USB IDE Drive in an external IcyBox enclosure.

Concept is to have a backup - test system to XP; booting from USB direct for Slack (I have a BIOS option to select which drive to boot from rather than use a boot loader) and leaving the standard XP loader to handle normal starts.

Have partitioned the drive as follows
/dev/sda1 - Linux - Ext2 bootable
/dev/sda2 - Fat32 (for access by both OS)
/dev/sda3 - Swap

Things went well until the boot loader config. I have tried all options but to no avail!

Reading around I think I need to make a initrd to preload the USB HDD otherwise /root will not be visible on sda1.

any clues how? I know it involves mkinitrd, but I cannot mount the drive /dev/sda1 from the Slack Install CD, (I do have a Slax Live CD if I can use that...)

I was planning on

mkinitrd --with-usb --preload=ehci-hcd --preload=usb-storage --preload=scsi_mod --preload=sd_mod ./initrd.gz 2.4.31

in /boot
is that correct?

Cheers
J
 
Old 04-21-2006, 02:00 PM   #2
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,766

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
That seems like it would do it, but it may not. What happens is that the drivers take a few seconds to load, while kernel execution proceeds to other things. Your initrd should include a 'sleep' command of at least 2-3 seconds. Some folks use up to 15-20 sec. Take a look at the initrd for RUNT linux, which does what you want. Probably just plug it in where your kernel is and go.
 
Old 04-21-2006, 03:00 PM   #3
tICT
LQ Newbie
 
Registered: Apr 2006
Location: Ilkley, UK
Posts: 3

Original Poster
Rep: Reputation: 0
Problem when I ran

chroot /mnt/sda1

mkinitrd --preload ehci-hcd --preload usb-storage --preload scsi_mod --preload sd_mod boot/initrd.gz vmlinuz-ide-2.4.31

I got the following warnings...

mount: could not find any free loop device
cat: /proc/partitions: No such file or directory
umount: /tmp/tmp.2WoZMn: not mounted
rmdir: `/tmp/tmp.oA6Nst': Directory not empty


I have tried to mount a loopback device manually but this fails too.

Any ideas?

J
 
Old 04-23-2006, 02:04 PM   #4
tICT
LQ Newbie
 
Registered: Apr 2006
Location: Ilkley, UK
Posts: 3

Original Poster
Rep: Reputation: 0
Have now managed to sort the previous problem out (thanks due to Tomas of Slax fame). Solution is as follows:

This is what you must do before chroot
mount --rbind /dev /mnt/sda1/dev
mount --rbind /proc /mnt/sda1/proc
chroot /mnt/sda1

This way you'll have /dev and /proc ready after you chroot, so you can
try to execute mkinitrd again.

However...!

Still no joy.

Made the edits, but still get the error

GRUB loading stage 1.5
GRUB loading please wait
Error 15

I don't understand where GRUB is coming from since I thought Slackware
used LILO. Any thoughts, please?

What I have done is to modify the linuxrc and load_kernel_modules
files since mkinitrd didn't work.

I have added the lines
ehci-hcd
usb-storage
scsi_mod
sd_mod
to the list of modules (not sure if this is correct since the comment
line in the file suggested insmod MODULE.ko)

I then added
/bin/insmod usbcore
...
...
sleep 5s

to the linuxrc script, before gzipping the initrd & copying it back to
/boot (I copied sleep into the bin in initrd since this wasn't
available)

I tried to run liloconfig, but this didn't do anything - couldn't find
it on sda1 even though it is there !?


Where is GRUB coming from since I never installed it...?
 
Old 04-24-2006, 01:14 AM   #5
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,766

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
As I mentioned, th initrd created by mkinitrd will not work anyway since it doesn't provide a sleep time.
Have a look at the initrd for RUNT which does what you want.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Install linux on USB HDD mattedue Linux - Software 5 12-15-2006 05:20 PM
Install Linux USB HDD syale Linux - Newbie 2 02-07-2006 07:34 AM
Booting Slackware to USB External HDD linux_weenie Slackware 1 05-15-2005 09:47 PM
Install on USB hdd ? NobleSilkFairy Linux - Newbie 3 04-15-2005 10:52 PM
Install directly to HDD from iso on HDD/USB, with out burning cd vivinuthappa DamnSmallLinux 7 11-16-2004 10:03 AM


All times are GMT -5. The time now is 03:12 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration