Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
flannerby opened this issue Feb 11, 2020 · 7 comments

Comments

@flannerby
Copy link

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.

@kamilion
Copy link
Owner

kamilion commented Feb 19, 2020

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

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

@flannerby
Copy link
Author

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!

@kamilion
Copy link
Owner

kamilion commented Mar 19, 2020

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.

@gcoletaalves
Copy link

gcoletaalves commented Jun 29, 2020

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?

@kamilion
Copy link
Owner

kamilion commented Jul 9, 2020

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

@gcoletaalves
Copy link

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

I did, it didn't work

@hsd-dev
Copy link

hsd-dev commented Aug 10, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants