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

Notices


Reply
  Search this Thread
Old 01-21-2007, 07:17 AM   #1
samac
Senior Member
 
Registered: Mar 2004
Location: Kirkwall, Orkney
Distribution: Linux Mint 20.3 - Cinnamon
Posts: 1,425

Rep: Reputation: 139Reputation: 139
Slackware "USB Boot CD" HOWTO


Slackware "USB Boot CD" HOWTO

After installing a minimal Slackware 11.0 on my USB2.0 external drive (see this thread) http://www.linuxquestions.org/questi...d.php?t=518905, I had to be able to boot it from a laptop, the bios of which, does not support USB booting.

Stage 1
Install Slackware on the USB drive, using huge26.s, connected to the machine that you will use the USB drive with.

Stage 2
Reboot using a rescue cd/live distribution, and do all the following instructions as root.

Stage 3
Mount your USB linux system eg.
Code:
mount -t reiserfs /dev/sda5 /mnt/hd
mount -t ext2 /dev/sda1 /mnt/hd/boot
mount -t reiserfs /dev/sda7 /mnt/hd/home
Stage 4
chroot to the mount point
Code:
chroot /mnt/hd
Stage 5
mount cd or partition with Slackware packages.
Code:
mount -t iso9660 /dev/hdc /mnt/cdrom
(the cd drive should become free when you chroot to your new root directory)
Install kernel 2.6.17.13 plus modules using the Slackware 11.0 install cd 2
Code:
installpkg /mnt/cdrom/extra/linux-2.6.17.13/kernel-generic-2.6.17.13-i486-1.tgz
installpkg /mnt/cdrom/extra/linux-2.6.17.13/kernel-modules-2.6.17.13-i486-1.tgz
rm /etc/rc.d/rc.modules
ln -s rc.modules-2.6.17.13 rc.modules
Stage 5
Make your initrd.gz (a mini linux system that allows your main system to boot).
Code:
cd /boot
mkinitrd -c -k 2.6.17.13 -m reiserfs:uhci-hcd:ehci-hcd:ohci-hcd:usb-storage
Stage 6
Prepare the build directory and files, isolinux is on cd 1.
Code:
mkdir /bootcd
cp /boot/initrd.gz /bootcd/initrd.gz
cp /boot/vmlinuz-generic-2.6.17.13 /bootcd/linux
cp /mnt/cdrom/isolinux/isolinux.bin /bootcd/isolinux.bin
echo "DEFAULT linux initrd=initrd.img ro root=/dev/sda5" > /bootcd/isolinux.cfg
Stage 7
Time to rebuild the initrd.gz
Code:
cd /bootcd/
mkdir tmp/
gunzip initrd.gz
mount -o loop initrd tmp/
cd tmp
pico rootdev and add a line similar to this
Code:
/dev/sda5
pico rootfs and add a line similar to this
Code:
reiserfs
pico linuxrc and add after the modules section but before the lvm section.
Code:
sleep 10
Then run the following commands
Code:
cd ..
umount tmp/
rmdir tmp/
gzip -c -9 initrd > initrd.img

Stage 8

Build the bootcd.iso, this is done in the /bootcd directory.
Code:
mkisofs -o bootcd.iso -b isolinux.bin -c boot.cat\
-no-emul-boot -boot-load-size 4 -boot-info-table -J\
-hide-rr-moved -R .
Remember the final .
Then burn your iso, I use k3b but this can also be done from the command line using cdrecord.


Stage 9
Put the cd where it belongs, make sure your external USB drive is connected and on, boot and enjoy.

Last edited by samac; 02-03-2007 at 10:21 AM.
 
Old 01-23-2007, 12:12 AM   #2
vbisis
Member
 
Registered: Dec 2005
Distribution: Slackware
Posts: 250

Rep: Reputation: 34
sounds great!

I will try as soon as possible
 
Old 02-03-2007, 09:11 AM   #3
tux21
LQ Newbie
 
Registered: Jul 2004
Posts: 6

Rep: Reputation: 1
1.
echo "DEFAULT linux initrd=initrd.img ro root=/dev/sda5" > /bootcd/isolinuxcfg

is

echo "DEFAULT linux initrd=initrd.img ro root=/dev/sda5" > /bootcd/isolinux.cfg

2.

gzip -c 9 initrd > initrd.img

is

gzip -c -9 initrd > initrd.img

3.

cp /mnt/cdrom/isolinux/isolinux.bin /bootcd/isolinux.bin

is in disk 1

4.

installpkg /mnt/cdrom/slackware/extra/linux-2.6.17.13/kernel-generic-2.6.17.13-i486-1.tgz

is

installpkg /mnt/cdrom/extra/linux-2.6.17.13/kernel-generic-2.6.17.13-i486-1.tgz

in disk 2

5.

mkisofs -o bootcd.iso -b isolinux.bin -c boot.cat \
-no-emul-boot -boot-load-size 4 -boot-info-table -J \
-hide-rr-moved -R .

must be done while in /bootcd directory.bEFORE that initrd.img must be copied in /bootcd
 
Old 02-03-2007, 10:24 AM   #4
samac
Senior Member
 
Registered: Mar 2004
Location: Kirkwall, Orkney
Distribution: Linux Mint 20.3 - Cinnamon
Posts: 1,425

Original Poster
Rep: Reputation: 139Reputation: 139
Thanks tux21

I have made the changes.

I guess I should try to learn to proof read, and also write things down rather than do them from memory.

More importantly, did this work for you.

Samac
 
Old 02-03-2007, 02:24 PM   #5
tux21
LQ Newbie
 
Registered: Jul 2004
Posts: 6

Rep: Reputation: 1
ofcourse it did.

yours is one of the few guides for people like me with 5 yr old pc

by the way where did you get this info from?
 
Old 02-03-2007, 02:45 PM   #6
samac
Senior Member
 
Registered: Mar 2004
Location: Kirkwall, Orkney
Distribution: Linux Mint 20.3 - Cinnamon
Posts: 1,425

Original Poster
Rep: Reputation: 139Reputation: 139
I pieced it together from about a half dozen sources and reading the info in the boot cd text files.

Samac
 
  


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
HOWTO: Correct "Out of Range" error for LCD monitor on SuSE 10.1 boot doobie_doobie_doo SUSE / openSUSE 3 02-06-2008 03:06 AM
"Installing non-distro Linux on USB key" or "Using syslinux to boot a jffs2" lymae Linux - Newbie 6 12-31-2006 10:00 PM
K3b: - Howto re-dock "Directories" and "Contents" windows back into the main window? hagies Linux - Software 4 04-26-2006 08:38 AM
How to use Use "USB Flash Drives" in Slackware?? DdOs Linux - Newbie 26 03-31-2006 02:57 PM
Writing to "/dev/usb/hiddev*" and to "/proc/bus/usb/00B/00S" throw an arror EI stpg Programming 0 07-14-2004 05:44 AM

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

All times are GMT -5. The time now is 05:26 AM.

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