customizer icon indicating copy to clipboard operation
customizer copied to clipboard

No such file or directory: '/home/customizer/FileSystem/boot/initrd.img.old'

Open flannerby opened this issue 5 years ago • 7 comments

After mounting Lubuntu 19.10 desktop iso (from Lubuntu 19.10 installed OS) attempting to rebuild the iso comes up with this error, occurs even if no changes have been made. When i physically look in the folder for initrd.img.old it is present but seems to go unseen.

The following is the result of sudo customizer -r

* Read Configuration file: /etc/customizer.conf
* Rebuilding ISO...
  => Checking
  => Doing sanity checks
  => Gathering information
  => Cleaning up
  => Updating initramfs
  => Copying boot files
* OS: [Errno 2] No such file or directory: '/home/customizer/FileSystem/boot/initrd.img.old'

If needed to reproduce data from customizer.conf is as follows:

[DEFAULT]
work_dir = /home/customizer
locales = C
resolution = 800x600
compression = gzip
vram = 256
iso = 
deb = 
hook = 
kernel = default
purge_kernel = True

[preferences]
work_dir = /home/customizer
locales = C
resolution = 800x600
compression = gzip
vram = 256

[saved]
iso = /home/lubuntu/Desktop/lubuntu-19.10-desktop-amd64.iso
deb = /home/lubuntu/Desktop/customizer_4.2.0-0+20180825_all.deb
hook = 
kernel = default
purge_kernel = True

The customizer deb was made using source from master.

flannerby avatar Feb 11 '20 00:02 flannerby

You're missing the linux-image-<version>-generic package.

As an example, focal needs linux-image-5.4.0-14-generic.

kamilion avatar Feb 19 '20 15:02 kamilion

Sorry for the long delay for a response was unable to test this until now. Thanks for the tip this did get me past the error I was getting before but now I am getting a new error. My process was to run in order:

lubuntu@lubuntu-pc:~$ sudo customizer -c
root@lubuntu-pc:/# sudo apt update
root@lubuntu-pc:/# sudo apt install linux-image-generic
root@lubuntu-pc:/# exit

And the result from customizer -r

lubuntu@lubuntu-pc:~$ sudo customizer -r
* Read Configuration file: /etc/customizer.conf
* Rebuilding ISO...
  => Checking
  => Doing sanity checks
  => Gathering information
  => Cleaning up
  => Updating initramfs
update-initramfs: Generating /boot/initrd.img-5.3.0-40-generic
cryptsetup: WARNING: Couldn't determine root device
  => Copying boot files
* Unexpected error: 'NoneType' object has no attribute 'group'

Thanks for the help so far!

flannerby avatar Mar 05 '20 02:03 flannerby

It's choking on /boot/initrd.img.old, a symlink. Remove just the "initrd.img.old" symlink, and all should be well. I'll have some kind of fix for the regex version extraction in the next release.

More specifically, for my own notes:

https://github.com/kamilion/customizer/blob/master/src/actions/rebuild.py#L215

kernel_type = re.search('initrd.img-*.*.*-*-(.*)', initrd).group(1)

fails to match .group(1) against initrd.img.old, chokes, and bails out.

One of the things I'd like to do here is improve the kernel detection routines so it doesn't blindly update-initramfs every time you try to rebuild the ISO.

kamilion avatar Mar 19 '20 04:03 kamilion

I have de same problem. I run customizar -e, customizer -c (and execute only apt install -y net-tools htop openjdk-11-jre-headless) and customizer -r and the output is:

* Read Configuration file: /etc/customizer.conf
* Rebuilding ISO...
  => Checking
  => Doing sanity checks
  => Gathering information
  => Cleaning up
  => Updating initramfs
  => Copying boot files
* OS: [Errno 2] No such file or directory: '/home/customizer/FileSystem/boot/initrd.img.old'

But the instructions above not work for me

@kamilion @flannerby can u help?

gcoletaalves avatar Jun 29 '20 19:06 gcoletaalves

@gcoletaalves Remove the dangling symbolic link initrd.img.old.

kamilion avatar Jul 09 '20 05:07 kamilion

@gcoletaalves Remove the dangling symbolic link initrd.img.old.

I did, it didn't work

gcoletaalves avatar Jul 10 '20 19:07 gcoletaalves

For me the following steps worked:

lubuntu@lubuntu-pc:~$ sudo customizer -c
root@lubuntu-pc:/# apt-get update
root@lubuntu-pc:/# apt-get install linux-image-generic
root@lubuntu-pc:/# rm /boot/initrd.img.old
root@lubuntu-pc:/# exit
lubuntu@lubuntu-pc:~$ sudo customizer -r

hsd-dev avatar Aug 10 '20 15:08 hsd-dev