LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Setting up persistence in elilo.conf (https://www.linuxquestions.org/questions/slackware-14/setting-up-persistence-in-elilo-conf-4175723352/)

camorri 03-23-2023 03:20 PM

Setting up persistence in elilo.conf
 
My desktop system has 3 bootable drives installed, sda, sdb, and nvme0n1.

Sda has slackware current 64 bit install, as does sdb. I wan to remove sda, since its an older, slower spinning drive. sdb is an ssd. The nvme has Slackware 15 64 bit installed and has the efi partition. I have modified /etc/fstab to use uuid's of the partitions I need mounted. That works as expected. Here is what fstab contains now.

Code:

cat /etc/fstab
UUID=0f58460c-0460-4f77-ac50-5c42c76be58e        swap            swap        defaults        0  0
UUID=f7291211-1ea1-4d27-8751-a9de887c3090        /                ext4        defaults        1  1
UUID=f08565a6-fbe0-4bcb-b730-6abc46a5a1aa        /home            ext4        defaults        1  2
/dev/nvme0n1p1  /boot/efi        vfat        defaults        1  0
#/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
192.168.1.69:/home/cliff/sda1/Slackware-tree/slackware-current /home/cliff/mnt nfs rsize=8192,noexec,nosuid

The problem is I can not get persistence set up in elio.conf. Here is the content of elilo.conf.

Code:

cat /boot/efi/EFI/current/elilo.conf
chooser=textmenu
default=current
delay=50
timeout=50
prompt
#
message=textmenu-message.msg
#

image=vmlinuz-huge-6.1.21
###      initrd=initrd-6121.gz
###      root="UUID=f7291211-1ea1-4d27-8751-a9de887c3090"
###      root=PARTUUID="f3bfcf12-30f7-4de6-ac7f-70154cb6abea"
      label=current
      root=/dev/sdb2
      read-only
###      append="root=UUID=f7291211-1ea1-4d27-8751-a9de887c3090 vga=791 ro nvidia-drm.modeset=1"
      append="vga=791 ro nvidia-drm.modeset=1"

I'm using the huge kernel to avoid using a initrd.gz file. I would like to get the initrd set up to boot the generic kernel after I get persistence working for huge.

root=/dev/sdb2 allows the kernel to find the root partition, and all is well.

To get persistence working I followed the How To in Slack Docs. This is the link I followed. -->http://docs.slackware.com/howtos:sla...sistent_naming

It does not mention elilo, only lilo. I search for doc on elilo and found nothing useful.

My attempts are shown beside the ### marks. I tried one at a time, all failed, with the kernel unable to mount the root partition. Hard stop.

What is the correct syntax to set up persistent naming in elilo.conf?

I use the script in /usr/share/mkinitrd to build an initrd. It has always worked for me. Any time I run it; the -r option looks like '-r /dev/sdb2'. How do I set this up so its persistent? Again, I tried uuid= and partuuid= with the correct hex strings. All fail.

Is there a solution or is this never going to work?

marav 03-23-2023 03:47 PM

Code:

root="UUID=f7291211-1ea1-4d27-8751-a9de887c3090"
Maybe, remove the double quotes

root=UUID=f7291211-1ea1-4d27-8751-a9de887c3090

LuckyCyborg 03-23-2023 03:52 PM

Practical case of elilo.conf entry used by myself in the past.
Code:

# Linux entry config begins
image = /EFI/Slackware/Current/vmlinuz-generic
    root = "UUID=1354641d-5adc-4b24-bafc-1aa8c6be5c25"
    label = Current
    append = "mitigations=off preempt=voluntary usb-storage.quirks=0080:a001:u,0bda:1a2b:i resume=UUID=cd7acbc0-3c2a-4a2d-baab-cea2c9bcb2b3 scsi_mod.use_blk_mq=1 zswap.enabled=1 zswap.compressor=lzo zswap.max_pool_percent=20 zswap.zpool=z3fold rootflags=noatime,commit=60,errors=remount-ro,discard,defaults"
    initrd = /EFI/Slackware/Current/initrd-generic.img
    read-only
# Linux entry config ends

BTW, for using UUIDs the initrd usage is a must.

camorri 03-23-2023 04:03 PM

marav, thank-you for your response. I tried it:

Quote:

chooser=textmenu
default=current
delay=50
timeout=50
prompt
#
message=textmenu-message.msg
#

image=vmlinuz-huge-6.1.21
### initrd=initrd-6121.gz
root=UUID=f7291211-1ea1-4d27-8751-a9de887c3090
### root=PARTUUID="f3bfcf12-30f7-4de6-ac7f-70154cb6abea"
label=current
# root=/dev/sdb2
read-only
### append="root=UUID=f7291211-1ea1-4d27-8751-a9de887c3090 vga=791 ro nvidia-drm.modeset=1"
append="vga=791 ro nvidia-drm.modeset=1"
however, this does not work.

LuckyCyborg 03-23-2023 04:04 PM

Quote:

Originally Posted by camorri (Post 6419780)
marav, thank-you for your response. I tried it:



however, this does not work.

You MUST use an initrd[1], otherwise the UUIDs will NOT work - they are mapped to partition devices by the init script from initrd.

And the generic kernel, of course.

camorri 03-23-2023 04:11 PM

OK, if I have to have an initrd for huge, is it good to use -r/dev/sdb2 ? I have tried other things here, and only this has worked so far.

LuckyCyborg 03-23-2023 04:13 PM

Quote:

Originally Posted by camorri (Post 6419785)
OK, if I have to have an initrd for huge, is it good to use -r/dev/sdb2 ? I have tried other things here, and only this has worked so far.

WHY to use the huge kernel with an initrd? Add the filesystem module(s) to initrd instead.

Didier Spaier 03-23-2023 04:22 PM

Quote:

Originally Posted by LuckyCyborg (Post 6419776)
append = "mitigations=off preempt=voluntary usb-storage.quirks=0080:a001:u,0bda:1a2b:i resume=UUID=cd7acbc0-3c2a-4a2d-baab-cea2c9bcb2b3 scsi_mod.use_blk_mq=1 zswap.enabled=1 zswap.compressor=lzo zswap.max_pool_percent=20 zswap.zpool=z3fold rootflags=noatime,commit=60,errors=remount-ro,discard,defaults"
initrd = /EFI/Slackware/Current/initrd-generic.img
read-only
# Linux entry config ends
[/code]

Why zswap? swap in zram is better, and zswap can make crash a system.
Quote from Zygo on IRC:

LuckyCyborg 03-23-2023 04:28 PM

Quote:

Originally Posted by Didier Spaier (Post 6419794)
Why zswap?

Because it works very nice?

Quote:

Originally Posted by Didier Spaier (Post 6419794)
swap in zram is better, and zswap can make crash a system.

Never happened here, and I use zswap extensively. In some cases even I use zswap combined with a swap device in zram.

Quote:

Originally Posted by Didier Spaier (Post 6419794)
Quote from Zygo on IRC:

This site is not available in Mordor. Not a big loss thought, because I am not a fan of IRC.

camorri 03-23-2023 04:31 PM

I generated an initrd and added it. It boots normally now. So, lesson learned. The huge kernel needs an initrd if you use UUID's for persistence.

I will now copy the generic kernel over; and pull the sda drive and test to see if sdb becomes sda, and no attention is needed, ie it just works.

LuckyCyborg 03-23-2023 04:33 PM

Quote:

Originally Posted by camorri (Post 6419798)
I generated an initrd and added it. It boots normally now. So, lesson learned. The huge kernel needs an initrd if you use UUID's for persistence.

I will now copy the generic kernel over; and pull the sda drive and test to see if sdb becomes sda, and no attention is needed, ie it just works.

Be sure that you added the rootfs modules to initrd before overriding kernels.

Didier Spaier 03-23-2023 04:38 PM

Quote:

Originally Posted by LuckyCyborg (Post 6419796)
Not a big loss because I am not a fan of IRC.

This is a bridge of an IRC channel through element.io, that I use so I can browse the history of a conversation which is not possible using IRC directly, so no need to be online to stay in the room.

camorri 03-23-2023 04:39 PM

After adding the generic kernel, all seems good. It booted normally.

Tomorrow I will remove the sda drive and test again. Thank-you for your help.

Wiser Slacker 03-25-2023 10:01 PM

If you don't want to use any initrd - you dont need to - like me ;)
you may need the "root=PARTUUID= " part - but this is a different UUID than the "UUID= " named above ..
have a look at /dev/disk/by-partuuid/

more - you could found here
https://docs.slackware.com/howtos:sl...sistent_naming

have fun

Chuck56 03-26-2023 07:45 AM

Quote:

Originally Posted by Wiser Slacker (Post 6420293)
If you don't want to use any initrd - you dont need to - like me ;)
you may need the "root=PARTUUID= " part - but this is a different UUID than the "UUID= " named above ..
have a look at /dev/disk/by-partuuid/

more - you could found here
https://docs.slackware.com/howtos:sl...sistent_naming

have fun

Thanks for the link. I learned something new today!


All times are GMT -5. The time now is 04:43 PM.