Need some help with Proxmox init script

sacarias

Active Member
Oct 2, 2019
64
1
26
Hello.

I'd like to propose some humble yet positive addition to Proxmox init script.
However I reached a point where I can no longer test and need some help, if possible.


Background:
I'm trying to boot and install from ISO located in another partition.

Somehow I managed Grub boot parameters, so ISO boots, and eventually I get to the point of "no device with valid ISO found, please check your installation medium", then the debug shell.

At this point I use "vi init" to make the modifications in the init script. Once done, I run the script again with "./init".

End of background.


The stuff I put seems to work: now it's able to find the ISO and continue. However now it halts with error seemingly at line 391 with the "switch_root" command. This because last things I see are the message "switching root from initrd to actual installation system", then Busybox's switch_root man page. Exit status is '1'.

In short, I'm getting just this:
https://unix.stackexchange.com/questions/5032/trouble-getting-busybox-switch-root-to-work
Seemingly the problem would be precisely not being PID 1, perhaps due to having entered the debug shell.
Indeed, any attempt of using "switch_root" command in the shell results in the same man page and exit status.
In the link it's suggested to use "exec" to solve this, but in this case "exec" just makes whole system to reboot, and of course all changes are lost.

Perhaps the most obvious thing to do would be the longer way: mount ISO, unpack initrd image, modify script, repack initrd, and rebuild ISO. Problem is, at least in my case, I always get errors when trying to unpack the initrd, and I don't know how to faithfully rebuild an ISO image.

So, question asking for help is, is there a way to overcome the "switch_root" issue while in init script's shell? To see if installer could finally start.

Thanks for your help.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!