1

I first installed slackware with the drive in HDD1 slot, then once I got a caddy for HDD2, I reconnected the slackware drive to the HDD2 slot. (I have Windows on my HDD1).

Is there a way to boot slackware from HDD2 (my system is a Dell Studio laptop) without reinstalling? Will reinstalling alone even work?

Here's the last lines before hangup on boot:

http://i.imgur.com/02XY18h.jpg

1

One way you could do this is booting from the DVD of the Slackware iso.

Then, when at the root prompt, you should mount the root partition of the hard drive, like this (used sdb1 in the example)

mkdir /mnt/sdb1
mount /dev/sdb1 /mnt/sdb1
mount --bind /dev /mnt/sdb1/dev
mount --bind /sys /mnt/sdb1/sys
mount --bind /proc /mnt/sdb1/proc
chroot /mnt/sdb1

Now, edit /etc/fstab and change mount points according, knowing that probably your disk was labeled sda before and now it will be named sdb.

If you're using the default boot loader, lilo, edit /etc/lilo.conf and in the boot section change both the line boot = /dev/sda to boot = /dev/sdb and the root line in

image = /boot/vmlinuz
root = /dev/sdb1       <-- change here to sdb1
label = Slackware64
vga = 773
initrd = /boot/initrd.gz
read-only

now run /sbin/lilo so that it can install lilo again with the new definition.

One last thing you should check is whether you're using initrd or not. If you made no modifications to the boot procedure, probably you're not using it, so the above procedure is sufficient. If you're using initrd, take a look at /usr/share/mkinitrd/mkinitrd_command_generator.sh to build a new initrd.

  • @MichaelKjörling: Both the boot line and the root instruction must be modified. Edited the text to be clearer. – Luis Jun 7 '13 at 11:59
0

You need to tell the kernel where to find the root file system. Currently, it finds a NTFS file system where it expects a root file system, which probably doesn't hold what's needed (as indicated by the kernel complaining about No init found).

To test this, in the boot loader, edit the kernel command line and either edit the or append a root= parameter. It probably says something along the lines of root=/dev/sda1 right now; change the device name's a to b to point to the same partition on the second hard disk drive. Depending on exactly how your system is set up hardware-wise it may also be either c or e (if all else fails, try every lower-case letter starting at a).

Once you get your system booting, make the corresponding change to the boot loader configuration. I don't know exactly what the Slackware way of doing it is, but looking in /boot/grub/menu.lst is probably a good start.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.