LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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, 08:17 AM   #1
samac
Senior Member
 
Registered: Mar 2004
Location: Westray, Orkney
Distribution: Linux Mint 17.1
Posts: 1,424

Rep: Reputation: 137Reputation: 137
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 11:21 AM.
 
Old 01-23-2007, 01: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, 10: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, 11:24 AM   #4
samac
Senior Member
 
Registered: Mar 2004
Location: Westray, Orkney
Distribution: Linux Mint 17.1
Posts: 1,424

Original Poster
Rep: Reputation: 137Reputation: 137
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, 03: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, 03:45 PM   #6
samac
Senior Member
 
Registered: Mar 2004
Location: Westray, Orkney
Distribution: Linux Mint 17.1
Posts: 1,424

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

Samac
 
  


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


All times are GMT -5. The time now is 07:37 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration