LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - Installation (https://www.linuxquestions.org/questions/slackware-installation-40/)
-   -   How do you install ON a thumbdrive? (https://www.linuxquestions.org/questions/slackware-installation-40/how-do-you-install-on-a-thumbdrive-4175521051/)

chicken76 10-04-2014 12:35 PM

How do you install ON a thumbdrive?
 
1 Attachment(s)
Okay, I've installed Slackware on a USB stick and after reboot, it won't start. The kernel panics when trying to mount the root partition.

Most of the tutorials on the Net are for installing from a thumbdrive, not onto one, so I'm a bit puzzled. The thing is I'm trying to use the huge.s kernel from the Slackware64-14.1 install DVD, which should work, right? If I do a network boot with huge.s I can mount the root filesystem, but when I supply "huge.s boot=/dev/sda1 rdinit= ro" it will panic like in the attached pic.

Am I missing something?

Attachment 16571

linus72 10-04-2014 01:06 PM

I've done this before too but can't remember hahah
did you try setting /dev/sdc1 as root?

chicken76 10-04-2014 01:08 PM

Quote:

Originally Posted by linus72 (Post 5249016)
I've done this before too but can't remember hahah
did you try setting /dev/sdc1 as root?

There is nothing in the system that would be recognized as sda or sdb before the USB drive, so I don't see the point for doing that.

linus72 10-04-2014 01:12 PM

I remember when I did it I had huge problems with fstab, etc as it would run ok on one pc but on another it would panic and couldnt find itself.
Have you considered making it a live distro so it runs like Slax with/without persistence and lots less wear on USB?

Didier Spaier 10-04-2014 02:17 PM

The name given to a removable device can change from start up to start up, e.g depending on what other devices are present.

To make it persistent, name it in /lilo/conf and /etc/fstab by its UUID or by its LABEL, see man lilo.conf and man fstab.

Examples found in man lilo.conf:
Code:

root="LABEL=MyDisk"
root="UUID=5472fd8e-9089-4256-bcaa-ceab4f01a439"

To know the UUIDS and LABELS (if any) of your partitions (including the USB key if inserted):
Code:

lsblk -o NAME,UUID,LABEL,MODEL,SIZE
To set or change the LABEL of an ext{2,3,4} partition use e2label.

Here are quotes from my /etc/fstab and /etc/lilo.conf in a system on an USB hard disk:
Code:

bash-4.2# cat /mnt/etc/fstab
LABEL=slack    /                ext4        defaults        1  1
#/dev/cdrom      /mnt/cdrom      auto        noauto,owner,ro,comment=x-gvfs-show 0  0
/dev/fd0        /mnt/floppy      auto        noauto,owner    0  0
devpts          /dev/pts        devpts      gid=5,mode=620  0  0
proc            /proc            proc        defaults        0  0
tmpfs            /dev/shm        tmpfs      defaults        0  0

#from /etc/lilo.conf
image = /boot/vmlinuz-generic-3.10.14
  root="LABEL=slack"
  initrd = /boot/initrd.gz
  label = Linux
  read-only

You don't need to do that for "boot = " in /etc/lilo.conf as when you issue the lilo command you of course know the name of the device or partition you want to write the boot sector on ;)

PS of course you should have built in your kernel or in an initrd all drivers plus the root's file system needed to communicate with your USB key.

chicken76 10-05-2014 09:13 AM

Thanks for the advice Didier, but none of the options worked. (tried UUID and LABEL)

What else could I try?

linus72 10-05-2014 11:05 AM

Yeah I had many issues with it too chicken76
In the meantime this is what I use to make a live iso/usb with persistence, etc similar to Slax/Porteus
After installing stuff, etc you gotta do as root ln -s /usr/lib/liblzma.so /usr/lib/liblzma.so.0 or it wont work, at least for me.
Noticed it panics if you try copy2ram with less than a GB of ram for me too.
http://slackware-live.tuxfamily.org/-Home-

Really much better anyway than having a rw HDD install on your usb with ext3/4
My USB is a 4gb fat32 Kingston
Only bad thing is you gotta make remasters of the rom to keep it current but it doesnt take long and you can make your own live distro

linus72 10-05-2014 11:05 AM

Yeah I had many issues with it too chicken76
In the meantime this is what I use to make a live iso/usb with persistence, etc similar to Slax/Porteus
After installing stuff, etc you gotta do as root ln -s /usr/lib/liblzma.so /usr/lib/liblzma.so.0 or it wont work, at least for me.
Noticed it panics if you try copy2ram with less than a GB of ram for me too.
http://slackware-live.tuxfamily.org/-Home-

Really much better anyway than having a rw HDD install on your usb with ext3/4
My USB is a 4gb fat32 Kingston
Only bad thing is you gotta make remasters of the rom to keep it current but it doesnt take long and you can make your own live distro

linus72 10-05-2014 11:06 AM

Yeah I had many issues with it too chicken76
In the meantime this is what I use to make a live iso/usb with persistence, etc similar to Slax/Porteus
After installing stuff, etc you gotta do as root ln -s /usr/lib/liblzma.so /usr/lib/liblzma.so.0 or it wont work, at least for me.
Noticed it panics if you try copy2ram with less than a GB of ram for me too.
http://slackware-live.tuxfamily.org/-Home-

Really much better anyway than having a rw HDD install on your usb with ext3/4
My USB is a 4gb fat32 Kingston
Only bad thing is you gotta make remasters of the rom to keep it current but it doesnt take long and you can make your own live distro

Didier Spaier 10-05-2014 12:38 PM

Quote:

Originally Posted by chicken76 (Post 5249241)
What else could I try?

I think that you are missing an initrd with appropriate modules.

To check, start you system, type
Code:

lsmod|sort > lsmod1
then plug in the USB key then write:
Code:

lsmod|sort > lsmod2
then
Code:

diff lsmod1 lsmod2
PS See also this thread.

chicken76 10-22-2014 07:53 AM

Quote:

Originally Posted by Didier Spaier (Post 5249297)
I think that you are missing an initrd with appropriate modules.

To check, start you system, type
Code:

lsmod|sort > lsmod1
then plug in the USB key then write:
Code:

lsmod|sort > lsmod2
then
Code:

diff lsmod1 lsmod2
PS See also this thread.

Thanks. It was the initrd that was missing.
I replied to your thread instead of this one.


All times are GMT -5. The time now is 01:17 AM.