Problem booting salix from external disk

You have a problem with Salix? Post here and we'll do what we can to help.
djemos
Salix Warrior
Posts: 1433
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: Problem booting salix from external disk

Post by djemos »

kernel-generic-smp-3.2.45_smp-i686-3
and create a initrd for kernel 3.2.45 not 3.2.29
rsal
Posts: 198
Joined: 12. Mar 2012, 17:00

Re: Problem booting salix from external disk

Post by rsal »

It does not work. I booted into my hard disk salixos installation and installed kernel-generic-smp-3.2.45_smp-i686-3 and kernel-modules-smp-3.2.45_smp-i686-3 and gave the command: "mkinitrd -c -k 3.2.45-smp -m ext4 -f ext4 -r /dev/sdb1". This created the initrd.gz file in /boot folder of hard disk which I transferred to /boot of usbdrive alongwith vmlinuz-generic-smp-3.2.45-smp file. I then corrected the grub-legacy menu.lst file and booted from usbdrive but got the error that /dev/sdb1 is not mounted. I am dropped in a limited shell. The /dev/ folder shows that all sda partitions are present but no sdb partition. Did I do any step incorrectly?
User avatar
gapan
Salix Wizard
Posts: 6241
Joined: 6. Jun 2009, 17:40

Re: Problem booting salix from external disk

Post by gapan »

Are you sure your usb drive is /dev/sdb?

You would also need to transfer all kernel modules if you're doing it that way.

A simpler way, that actually installs the packages, would be to use the --root option of spkg to specify your mounted usb drive, or to chroot into your usb drive and do everything from there.
Image
Image
djemos
Salix Warrior
Posts: 1433
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: Problem booting salix from external disk

Post by djemos »

How to boot salix from an external usb disk.

These has been tested and work
(/media/57ab93a9-ed94-44e3-984d-76b1b0826d98 is where is mounted my USB_stick. On a salix 14.0.1 kde installation). Replaced with yours.
We do not need generic kernel. the installed kernel-huge-smp-3.2.45_smp-i686-3 is what we need.

1. First install salix 14.0.1 from a livecd or a installation cd to the external disk drive. We do not install lilo since we will use grub to boot.
2. We also need an existing salix 14.0.1 installed to a hard drive.
3. We boot on our salix 14.0.1 hard disk installation.
4. Then we chroot to external usb disk where salix is also installed.

Code: Select all

su
mount -o bind /dev /media/57ab93a9-ed94-44e3-984d-76b1b0826d98/dev
mount -o bind /proc /media57ab93a9-ed94-44e3-984d-76b1b0826d98/proc
mount -o bind /sys /media/57ab93a9-ed94-44e3-984d-76b1b0826d98/sys
chroot /media/57ab93a9-ed94-44e3-984d-76b1b0826d98 /bin/bash
cd /boot
mkinitrd -c -k 3.2.45-smp -f ext4  -m usbhid:ehci-hcd:ext4 -u -o /boot/initrd.gz
exit
Now we edit our grub.cfg and add these lines

Code: Select all

menuentry "Slackware Linux (Slackware 14.0) (on /dev/sdb1)" {
	savedefault
	insmod ext2
	set root='(hd1,1)'
	search --no-floppy --fs-uuid --set 57ab93a9-ed94-44e3-984d-76b1b0826d98
	linux /boot/vmlinuz-huge-smp-3.2.45-smp root=/dev/sdb1
	initrd /boot/initrd.gz
}
Reboot
and boot on your external USB disk with salix.

I am writing this message from my USB stick installed salix-14.0.1-xfce-32 after booting with initrd.gz and grub.
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: Problem booting salix from external disk

Post by mimosa »

Should this work the same using an external hard disk connected via USB? If so, I'd be interested in giving it a try :)
djemos
Salix Warrior
Posts: 1433
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: Problem booting salix from external disk

Post by djemos »

Yes. I think it will work.
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: Problem booting salix from external disk

Post by mimosa »

OK, thanks, I'll give it a try!
rsal
Posts: 198
Joined: 12. Mar 2012, 17:00

Re: Problem booting salix from external disk

Post by rsal »

Yes, it worked. The huge-kernel together with initrd created using the mkinitrd command given above is needed to boot from a usb drive. The generic kernel does not work with this initrd.
Post Reply