The officially official Devuan Forum!

You are not logged in.

#1 2021-03-14 09:57:57

dice
Member
Registered: 2020-11-22
Posts: 559  
Website

[SOLVED] Refractasnapshot - boot issue (not a Refractsnapshot issue)

Rather than clogging up computer bobs thread for backing up i make a new thread continuing on from post #52

http://dev1galaxy.org/viewtopic.php?pid=28139#p28139

fsmithred wrote:
dice wrote:

Hi fsmithred, does refractasnapshot depend on having "initrd (initial ram disk): generic (all available drivers)" as opposed to "only select drivers to suit this hardware", during expert install? I have a feeling this is where the initramfs is failing.

Wow. Excellent question. I don't know the answer. I can't recall if this has ever come up in the 10 years I've been maintaining that script. I would expect a snapshot with limited drivers would only boot on the same or similar hardware.

That option is probably set in /etc/initramfs-tools/initramfs.conf. Compare the one with limited drivers to one with all available. If there's something obvious to change, change it, rebuild initramfs and make a new snapshot.  update-initramfs -u

If you want to save time in the above procedure, make the new initrd.img and copy it to /home/work/iso/live and then run refractasnapshot, but choose the option to run xorriso only. You'll be done in one minute.

I don't think I've ever done an install with drivers limited to the current hardware. I always assume that my old boxen will die and I'll have to move the hard drive to another computer.

Edit: if you do the shortcut in this case, and you use that iso to install on another system, you will need to edit initramfs.conf in that system. That could be done in the live system before install. That way when the initrd gets rebuilt during the install it will be good.

Edit 2: change initramfs.conf in /home/work/myfs/ and run the re-squash option in refractasnapshot. That will avoid the problem mentioned in the first edit. It'll take longer, too.

Ok so i had a look at both /etc/initramfs-tools/initramfs.conf , both are the same for limited drivers and all available.

What drivers get missed when using the limited drivers option in the expert install, i cant seem to figure that out?

fsmithred wrote:

I tried dice's qemu command (without the sudo) and my iso boots as cdrom or as disk. I'm pretty sure the problem is in the initramfs.

dice, please run:

lsinitramfs /initrd.img | egrep "resume|cryptroot|crypttab|askpass"

file -L /initrd.img

To answer this question from here http://dev1galaxy.org/viewtopic.php?pid=28136#p28136

This is from the system that has limited drivers and wont boot the snaphot.

# lsinitramfs /initrd.img | egrep "resume|cryptroot|crypttab|askpass"
conf/conf.d/resume
cryptroot
cryptroot/crypttab
scripts/local-block/cryptroot
scripts/local-premount/resume
scripts/local-top/cryptroot
usr/bin/cryptroot-unlock
usr/bin/resume
# file -L /initrd.img
/mnt/initrd.img: gzip compressed data, last modified: Sun Mar 14 09:21:56 2021, from Unix, original size 66083840

Last edited by dice (2021-03-14 15:34:59)

Offline

#2 2021-03-14 13:08:10

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,486  

Re: [SOLVED] Refractasnapshot - boot issue (not a Refractsnapshot issue)

Please do the same on either the mounted iso or mounted usb stick that has the image. Check /live/initrd.img to see if resume and crypttab got removed. Is the host system that made this snapshot an encrypted system?

lsinitramfs "$initrd.img" | egrep "resume|cryptroot|crypttab|askpass"

Note: in the previous post I started the command with '#' which suggests it needs to be run as root, but that is not the case. You can run the command as user.

Offline

#3 2021-03-14 13:19:26

dice
Member
Registered: 2020-11-22
Posts: 559  
Website

Re: [SOLVED] Refractasnapshot - boot issue (not a Refractsnapshot issue)

The host system is not encrypted.

from the mounted usb stick.

If i use the command you suggested i get this...

/liveiso/live $ lsinitramfs "$initrd.img" | egrep "resume|cryptroot|crypttab|askpass"
/usr/bin/unmkinitramfs: 62: /usr/bin/unmkinitramfs: cannot open .img: No such file
/usr/bin/unmkinitramfs: 55: /usr/bin/unmkinitramfs: cannot open .img: No such file
/usr/bin/unmkinitramfs: 36: /usr/bin/unmkinitramfs: cannot open .img: No such file
/usr/bin/unmkinitramfs: 36: /usr/bin/unmkinitramfs: lz4cat: not found
cpio: premature end of archive

without the $ and quotes aka "$initrd.img"...

/liveiso/live $ lsinitramfs initrd.img | egrep "resume|cryptroot|crypttab|askpass"
cryptroot
scripts/local-top/cryptroot
scripts/local-premount/resume
scripts/local-block/cryptroot
usr/bin/cryptroot-unlock
usr/bin/resume

Last edited by dice (2021-03-14 13:21:11)

Offline

#4 2021-03-14 14:38:55

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,486  

Re: [SOLVED] Refractasnapshot - boot issue (not a Refractsnapshot issue)

Yeah, the second way is correct. I should have explained the quotes and $. Replace that with path to the file you're checking. And it looks good. The script removed crypttab and resume as it should have. I don't know what the next step is.

Offline

#5 2021-03-14 14:52:00

dice
Member
Registered: 2020-11-22
Posts: 559  
Website

Re: [SOLVED] Refractasnapshot - boot issue (not a Refractsnapshot issue)

All good, thanks for your help anyhow. Its a pretty edge case this one i admit due to the expert install. I just chose that option as i thought it was a better alternative. Ill stick to all available drivers in the future. Id still like to see what is missing or not included in the initramfs.

Offline

#6 2021-03-14 14:55:22

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,486  

Re: [SOLVED] Refractasnapshot - boot issue (not a Refractsnapshot issue)

Unpack the initramfs from the bad iso and also the one from the good iso and compare them. (Hint: meld is a good program for comparing files and directories.) Use unmkinitramfs instead of the commands I posted in that other thread. It's easier. Plus, the command I posted for computerbob won't work for your initrd.img.

Offline

#7 2021-03-14 15:21:40

dice
Member
Registered: 2020-11-22
Posts: 559  
Website

Re: [SOLVED] Refractasnapshot - boot issue (not a Refractsnapshot issue)

Good tool meld, ive used it before but not for something like this, but it worked to diff in directories good-iso vs bad-iso.

I unpacked both initrd.img, the bad iso is 48mb smaller than the good iso when unpacked. The bad iso is missing a lot of kernel object .ko files. I couldnt see an option to extract a report or log from meld to post here. But yeah huge difference.

Last edited by dice (2021-03-14 15:25:16)

Offline

#8 2021-03-14 16:13:08

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,486  

Re: [SOLVED] Refractasnapshot - boot issue (not a Refractsnapshot issue)

I think I found it. Move /etc/initramfs-tools/conf.d/driver-policy out of the way and run update-initramfs -u and then make a new snapshot.

Offline

#9 2021-03-15 01:03:10

dice
Member
Registered: 2020-11-22
Posts: 559  
Website

Re: [SOLVED] Refractasnapshot - boot issue (not a Refractsnapshot issue)

fsmithred wrote:

I think I found it. Move /etc/initramfs-tools/conf.d/driver-policy out of the way and run update-initramfs -u and then make a new snapshot.

That was is it, the snapshot is now working as it should. Thanks again fsmithred.

Do you think this might be the issue with computer bobs snapshot ?

http://dev1galaxy.org/viewtopic.php?id=4188

Last edited by dice (2021-03-15 01:03:36)

Offline

#10 2021-03-15 13:33:31

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,486  

Re: [SOLVED] Refractasnapshot - boot issue (not a Refractsnapshot issue)

Confirmed that ComputerBob's problem is not the same as yours. He has a full initrd.img (24M).

Offline

#11 2021-04-02 11:55:51

ComputerBob
Member
From: The Sunshine State
Registered: 2018-10-11
Posts: 83  
Website

Re: [SOLVED] Refractasnapshot - boot issue (not a Refractsnapshot issue)

I'm still here, as a monkey with a keyboard, if there is anything I can do to help.  wink


ComputerBob - Making Geek-Speak Chic (TM)
ComputerBob.com - Nearly 6,000 Posts and 22 Million Views since 1998
My Massive Stroke
Help! (off-topic)

Online

Board footer