SlackwareThis Forum is for the discussion of Slackware Linux.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I installed Slack 11.0 on /dev/sdb2 of an external (USB)
hard drive, configured as master. I made a boot floppy.
Lilo was installed into the root partition superblock.
When I booted from the floppy I got a certain distance
into the boot and then got a kernel panic. Specifically:
Linux IP multicast router 0.06 plus PIM-SM
NET4: Unix domain sockets
NFS: Cannot open root device "sdb2" or 08:12
Please append a current "root=" boot option
Kernel panic: VFS: Unable to mount root fs on 08:12
I tried various boot options and other procedures
using a boot manager (Ranish) but always get kernel panic.
Linux fdisk correctly identifies /dev/sdb and /dev/sdb2
is bootable. I can mount /dev/sdb2 from another Linux OS
and the partition appears to be OK.
Thanks for that pointer, gbowden.
Very informative. I tried to use it as
a basis for booting to the USB partition
using a boot loader (Ranish).
I booted to the Slack11 CD and installed the default
Linux on /dev/sdb2. Then
# mount /dev/sdb2 /mnt
# cd /mnt/boot
# chroot /mnt /usr/sbin/mkinitrd -c -k 188.8.131.52 -m jbd:ext3
-f ext3 -r /dev/sdb2
# cd /mnt/etc
edit lilo.conf to include the lines:
Save file then
# chroot /mnt /sbin/lilo
When I select the partition /dev/sdb2 through the boot loader
/boot/initrd.gz: Loading kernel modules from initrd image
insmod: not an ELF file
insmod: could not load the module
mount: Mounting /dev/sdb2 on /mnt failed: No such file or directory
ERROR: mount returned error code 1. Trouble ahead
mount: mounting /dev/sdb2 on /mnt failed: Invalid argument
I guess there is something I am doing wrong, but what?
Is the mkinitrd command correct?
GOT IT! The trick was *not* to set the boot device in the
initrd config file rootdev. With /dev/sdb2 removed from
rootdev I was able to boot to the external USB HD through
my boot loader (Ranish).
In summary I used the Slack 11.0 boot disk and Ranish
to install the default kernel (184.108.40.206) in the partition
/dev/sdb2 of the USB drive, and then to boot Linux from this
partition. The procedure was:
(1) Boot to the Slack CD and format the partition. Install
Linux into /dev/sdb2 (use ext2 fs) and put lilo in the superblock.
(2) With the CD still in place make sure /dev/sdb2 is mounted
(3) Set up the initial ramdisk
# cd /mnt/boot
# chroot /mnt /usr/sbin/mkinitrd -k 220.127.116.11
(4) Copy usb modules to the initrd-tree/lib/modules/18.104.22.168
USB_MODULE_PATH = /mnt/lib/modules/22.214.171.124/kernel/drivers/usb
The files should be gunzipped after transfer.
(5) Insmod the usb modules in /mnt/boot/initrd-tree/load-kernel-modules.
Use the vi editor to insert them in this order:
insmod /lib/modules/$(uname -r)/usbcore.o
insmod /lib/modules/$(uname -r)/ehci-hcd.o
insmod /lib/modules/$(uname -r)/uhci.o
insmod /lib/modules/$(uname -r)/usb-storage.o
Other modules may be inserted as desired (eg if using
ext3 or reiserfs instead of ext2)
Make sure the file is executable
(chmod 755 load-kernel-modules)
(6) Use vi to insert the line "sleep 10" in
after the lines
Make sure linuxrc is executable (chmod 755 linuxrc)
(7) Make sure /mnt/boot/initrd-tree/rootdev is empty
(8) chroot /mnt /usr/sbin/mkinitrd
(9) Run lilo
# cd /mnt/etc
Edit lilo.conf with vi and insert the lines
# chroot /mnt /sbin/lilo
(11) If using Ranish select /dev/sdb2 as a boot item
and boot to the USB partition.
I Am Working On This Same Project But With Mandriva
The Exact Same Thing Happens When The System Tries To Mount Root
Will I Be Able To Use The Same Technique That Was Just Used Here?
I Wonder If I'll Have A Problem Editing These Files If I Have My Usb Drive Plugged Into My Machine That Is Running Mandriva.
Kernel Is 2.6.17
I don't know Mandriva, but it is probably worth a try.
You need a bootable CD and then you must install the OS
(in basic form) on the USB drive. You also need some
utilities on the boot CD such as chroot and an editor,
and of course you need mkinitrd either on the CD or
from the installed OS. The correct USB modules must be
available, and insmodded in the correct order. If you
get this wrong then you will have those nasty error messages.
Also you need some sort of boot manager which allows you
to set the bootable partition.
I can't see why you should have any problem editing the
files on the USB partition. If you can mount it then
you can treat it like any other partition.
There's nothing wrong with experimenting, since you will
still have your main Mandriva partition there if things
go wrong. I had to to try quite a few times before I got it