Page 1 of 2

[SOLVED] full install on usb don't boot correctly

Posted: 10 Aug 2020 13:00
by juliusse
Hi, I'm experiencing troubles in installing slackel on an USB stick.

I've followed the documentation, partitioned it correctly using gparted, and installed slackel with sli. The installer runs, and the installation is completed.

But, when trying to boot on the USB, there are issues.
Grub launches, and launch the system, but then I've got an ERROR message

Code: Select all

mount: can't find mnt in /etc/fstab
ERROR: No /sbin/init found on rootdev (or not mounted). Trouble ahead.
You can try to fix it. Type 'exit' when things are done
At this moment, if I type exit, I've got a kernel panic and end of the story.

Moreover, as I have an AZERTY french keyboard, it's very difficult to type commands in this case.

Any idea?

Re: full install on usb don't boot correctly

Posted: 10 Aug 2020 19:54
by djemos
Yes, you are right. I cannot understand why. I have checked this. I found that initrd.gz is not created correctly through sli. So i have to correct this and it will take time.
Since you have done the installation do what i did.
I have done the installation of slackel 64 7.3 openbox to a usb and i found a way to boot it. So plug in your usb.

NOTE: Change TARGET=/run/media/djemos/00183d49-7229-4275-aea4-af7eb4775089 with your mount point of usb in three scripts bellow.
1. copy the following code and save to a file named chroot-sl.sh in your ~/ directory

Code: Select all

#! /bin/sh

TARGET=/run/media/djemos/00183d49-7229-4275-aea4-af7eb4775089
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
2. copy the following code and save to a file named unchroot-sl.sh in your ~/ directory

Code: Select all

#! /bin/sh

TARGET=/run/media/djemos/00183d49-7229-4275-aea4-af7eb4775089
umount -l $TARGET/proc
umount -l $TARGET/sys
umount -l $TARGET/dev
umount -l $TARGET/tmp
umount -l $TARGET/etc/resolv.conf
3. copy the code bellow and save it as make_initrd.sh in your ~/ directory

Code: Select all

#!/bin/bash
#
systempart=/dev/sdb1
SYSINSTALLFS="ext4"
kv=5.4.50

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"

chroot /run/media/djemos/00183d49-7229-4275-aea4-af7eb4775089 mkinitrd -c -f $SYSINSTALLFS -u -w 10 -o /boot/initrd.gz  -r $systempart -k $kv -m $moduleslist
chroot /run/media/djemos/00183d49-7229-4275-aea4-af7eb4775089 rm -rf /boot/initrd-tree/
Now run in a terminal
sudo sh chroot-sl.sh
sudo sh make_initrd.sh
sudo unchroot-sl.sh

Reboot and boot with your usb.

Re: full install on usb don't boot correctly

Posted: 10 Aug 2020 21:29
by juliusse
The curious thing is that sli works perfectly for installation on a hard disk.
I will try the patch tomorrow and tell you.

Re: full install on usb don't boot correctly

Posted: 10 Aug 2020 21:42
by djemos
Installation on usb need an initrd.gz image to boot. While on hard disk do not. So when sli install slackel not in /dev/sda but in /dev/sdb etc creates the necessary initrd.gz. The curious think is that the same command for creating the initrd above is used also in sli. And it was working from tests i have done.

It is not a patch. You will run the above scripts from your real slackel system you have on your laptop and not from live environment.
I have done it and it is working.

Re: full install on usb don't boot correctly

Posted: 11 Aug 2020 11:03
by djemos
Forget about above scripts.
I finally found a way to build initrd.gz which is working at iso creation time and this initrd.gz is copied in /boot/ folder in iso as initrd-usb.gz
Then when installing to external usb or ssd it is copied in /boot/initrd.gz .It is not created when installing with sli.
And usb boot fine.
This method will be included in the future isos.

So for you and other users after installation in external usb with sli.
Download this initrd.gz and copy it with sudo to /boot/ folder of external usb to replace the old one.
Then boot with usb.

This initrd.gz is for slackel 64 openbox version.

Re: [SOLVED] full install on usb don't boot correctly

Posted: 11 Aug 2020 14:50
by juliusse
Hi again.
[Unsolved]

I've tried the initrd.gz file.

the usb have booted.... one time. slow, so I wanted to reboot and impossible to boot again. So I've tried see what was wrong and open the files with another machine, nada, to erase the disk to make a new install, but I'm afraid the usb (brand new :cry: ) has been fried.
Impossible to mount it, it's no longer recognized by any system.
I've tried evreything, another laptop, dd, fdisk, gdisk, ... nada.
the device is shown by lsusb, but not by lsblk, and the automount show me an error message that the device cannot be mounted.
Have you experienced it?

Re: [SOLVED] full install on usb don't boot correctly

Posted: 11 Aug 2020 16:12
by djemos
From your slackel system, plug in your udb and run gparted.
Select the device in gparted /dev/sdb. If usb patitions are mounted, unmount all partitions. Then erase everything and create a msdos partition table and a fat32 /dev/sdb1 partition only. Close gparted.
Then unplug it and plug it again. It will be shown in pcman file manager.

To boot with usb i reboot and then press fn+f12 to go to boot bios menu and from there i choose sun-cruser usb to boot.
System boot fast. I have done this many times here.

I will try again and i will report here.

Re: [SOLVED] full install on usb don't boot correctly

Posted: 11 Aug 2020 16:20
by djemos
I am writing this from usb just booted. Look at the time post of previous and this message.
Something else happened. This method works.
type neofetch and copy the output here to see what type is your laptop.

Code: Select all

djemos[~]$ neofetch 
        #####           djemos@slackel.example.net 
       #######          -------------------------- 
       ##O#O##          OS: Slackel Linux 5.4.50 x86_64 
       #######          Host: 80L0 Lenovo G50-80 
     ###########        Kernel: 5.4.50 
    #############       Uptime: 9 mins 
   ###############      Packages: 897 (pkgtool) 
   ################     Shell: bash 5.0.17 
  #################     Resolution: 1366x768 
#####################   WM: Openbox 
#####################   WM Theme: Clearlooks-Olive 
  #################     Theme: Adwaita [GTK2/3] 
                        Icons: matefaenza [GTK2/3] 
                        Terminal: lxterminal 
                        Terminal Font: Terminus 12 
                        CPU: Intel i3-4030U (4) @ 1.800GHz 
                        GPU: Intel Haswell-ULT 
                        Memory: 736MiB / 3853MiB 

Re: [SOLVED] full install on usb don't boot correctly

Posted: 11 Aug 2020 16:24
by juliusse
Thanks a lot, but I know how to use gparted. And I also know how to boot from USB.
The procedure you have described has been intended of course. But even with gparted the USB is not detected.

Re: [SOLVED] full install on usb don't boot correctly

Posted: 11 Aug 2020 16:28
by djemos
I never had problems with usb as this. It is not because of initrd something else happened or usb material failure.
I have 3 usb sun disk two of 16 GB and a 32 GB. which i use for testings with isos. i use one to install the iso with gui and then boot with it and make a real installation to the other and never happened such a problem.