trouble with sli

Post Reply
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

trouble with sli

Post by mimosa »

I've been experimenting with sli, and can't get it to install. I'm attempting to install to a USB memory stick (actual install, not copy) like a user who posted recently. I formatted the stick and created a fat partition I'm hoping will be used for EFI, and the rest ext4 which the installer sees and offers as an installation target.

EDIT On reflection, I suspect the Live installer isn't meant to be able to do that! <edit/>

That user posted to ask about how to make such an installation boot, and I'm trying to reproduce his situation, so I don't want to create a "copy", but an actual installation.

I tried selecting first grub, and then elilo, then unticking both. Here is the output when I call sli from a terminal:

Code: Select all

one[~]$ sudo sli
Password: 
formatting linux partition in grub
/usr/sbin/build-slackware-live.sh: line 496: mkfs.grub: command not found
formatting linux partition in lilo
/usr/sbin/build-slackware-live.sh: line 496: mkfs.lilo: command not found
formatting linux partition in no
/usr/sbin/build-slackware-live.sh: line 496: mkfs.no: command not found
one[~]$ fdisk -l /dev/sde
Disk /dev/sde: 7.2 GiB, 7748222976 bytes, 15133248 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 3A33EC91-00CD-45B8-A711-5EECB841CFE2

Device       Start      End  Sectors  Size Type
/dev/sde1     2048  1302527  1300480  635M Microsoft basic data
/dev/sde2  1302528 15132671 13830144  6.6G Linux filesystem
djemos
Salix Warrior
Posts: 1433
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: trouble with sli

Post by djemos »

Surfing in forums i saw above post.
Installer supports real installation to an external usb stick or usb hd or usb ssd disk.
But to boot after installation we need an initrd which it is not included in sli. (do it in the future)
Also there are some problems have to manage.
1. if boot from a live iso burned to a dvd then your external usb device will be recognized as /dev/sdb.
2. if boot from a usb live then this device will be /dev/sdb and the device wish to install salix will be recognized as /dev/sdc.
In this case we need to do some more work.

I choose the second option as i do not have a working dvd writer on my laptop.

Steps needed:

1. boot with live iso or live usb. After we see live environment, plug in the usb stick or external ssd or hd disk where we like to install salix.
2. this external device will recognized as /dev/sdb or /dev/sdc as i mention above.
3. run sli
4. press gparted button and pick up sdb or sdc. Unmount any partitions if are mounted or usb had a previous installation. Then delete all partitions on this device.
5. create a msdos partition table on this device
6. create an ext4 partition where we will install the linux system and a 2GB linux-swap partition. Check the linux partition /dev/sdb1 or /dev/sdc1 bootable
7. close the gparted and will return to sli. You will see on Install location "dev/sdb1" or "/dev/sdc1"
8. Set root password, user name and user password.
9 choose full installation which is default. and click on "install live system"
make a coffee.
after installation finishes close sli.

type in a xterminal uname -a
and write the kernel number version. (it is 4.4.19 for salix)
unplug your external usb and plug it in again. It will be opened in the file manager.
Look where it is mounted mine is mounted in /run/media/djemos/b73c62b5-a604-41be-8fac-b1200f14ded9

The following can be done while on live environment or also can reboot to a salix installation and continue from there.
I used the second option.

10. copy this script and save it as chroot-sl.sh in your ~/ directory (do not forget to change /run/media/djemos/b73c62b5-a604-41be-8fac-b1200f14ded9 with your mounted point)

#chroot-sl.sh script

Code: Select all

#! /bin/sh
#chroot-sl.sh

TARGET=/run/media/djemos/b73c62b5-a604-41be-8fac-b1200f14ded9
mount -o bind /proc $TARGET/proc
mount -o bind /sys $TARGET/sys
mount -o bind /dev $TARGET/dev
mount -o bind /tmp $TARGET/tmp
mount --bind /etc/resolv.conf $TARGET/etc/resolv.conf

chroot $TARGET /bin/bash -l


11. Copy also the following script and save it as unchroot-sl.sh in your ~/ directory. (do not forget to change /run/media/djemos/b73c62b5-a604-41be-8fac-b1200f14ded9 with your mounted point)
#unchroot-sl.sh script

Code: Select all

#! /bin/sh

TARGET=/run/media/djemos/b73c62b5-a604-41be-8fac-b1200f14ded9
umount -l $TARGET/proc
umount -l $TARGET/sys
umount -l $TARGET/dev
umount -l $TARGET/tmp
umount -l $TARGET/etc/resolv.conf

12. copy the following script and save it as make_initrd.sh in your ~/ directory. (change the 4.4.19 with the kernel number installed in external usb. I think 4.4.19 is right.)

#make_initrd.sh

Code: Select all

#!/bin/bash
#
moduleslist="loop:xhci-pci:ohci-pci:ehci-pci:xhci-hcd:uhci-hcd:ehci-hcd:mmc-core:mmc-block:sdhci:sdhci-pci:sdhci-acpi:usb-storage:hid:usbhid:i2c-hid:hid-generic:hid-apple:hid-asus:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:crc32c-intel:fuse"
mkinitrd -c -o /boot/initrd-4.4.19.gz -k 4.4.19 -m $moduleslist >/dev/null 2>&1
rm -rf /boot/initrd-tree/
type in xterminal

cp make_initrd.sh "where is mounted your external usb"/tmp ~/ folder. (e.g. in my case
cp make_initrd.sh /run/media/djemos/b73c62b5-a604-41be-8fac-b1200f14ded9/tmp)

type

Code: Select all

sudo sh chroot-sl.sh
you will be in chroot on external usb device
type

Code: Select all

sh /tmp/make_initrd.sh
sh update-grub
A. if we have boot from a live dvd
type cat /boot/grub/grub.cfg | grep sdb1
you have to see sbd1

edit /etc/fstab
you will see two swap partitions keep only the line has /dev/sdb2 and remove the other line.
It is good to not use swap internal hard disk installation.
save changes to /etc/fstab

B. if we have boot from a live usb
type cat /boot/grub/grub.cfg | grep sdc1
you have to see sbc1
type

Code: Select all

sed -i "s/sdc1/sdb1/g" /boot/grub/grub.cfg
edit /etc/fstab
you will see two swap partitions
change the line has /dev/sdc2 to /dev/sdb2 and remove the other line.

save changes to /etc/fstab

we have to do this because after booting our external usb drive will recognized as /dev/sdb

type

Code: Select all

exit
type

Code: Select all

sudo sh unchroot-sl.sh
In my lenovo laptop i reboot and press fn+F12 to go to boot bios menu
where i choose the usb San cruiser i did the installation.
reboot and press immediately fn+Function key for your system to go to boot bios menu
choose your external usb drive
You will boot to salix real installation on external drive.
Post Reply