[Live-demo] Chroot customization status

Alex Mandel tech_dev at wildintellect.com
Tue Aug 7 09:30:19 PDT 2012


On 08/07/2012 01:14 AM, Hamish wrote:
> Alex wrote:
>> I figured out setting the username,
>> hostname, password and boot kernel.
> 
> for posterity & the benefit of those searching the archives, can you
> briefly state what the trick was?
> 
> 
Rebuilding the initrd.lz file.
User and hostname are in the casper.conf
password is in scripts/casper-bottom/25adduser (specific number subject
to change), as a hash

To sneak these files and other possible changes into the boot sequence
you have to decompress, change the files and recompress. lz is an lzma
compressed archive. Unpacking and repacking is not as obvious as any
other format I've ever used. See the scripts or we for examples.

>> We can handle newer kernels but it's a little tricky so its
>> hard coded to the default kernel from Xubuntu iso for now.
> 
> what's the issue? how does it work that makes that needed?
> 
> (can you explain a little about what initrd is and how to go about
> changing and rebuilding it)
> 
>
So you can either use the original kernel from the base distro by
specifying it:
mkinitramfs -o initrd.lz 3.2.0-23-generic
Or if you want newer kernels in the the chroot
apt-get dist-upgrade
depmod
and then run the mkinitramfs without specifying a kernel or specifying
the newest one (by number).
The depmod is critical in order to build the modprobe.dep file,
mkinitramfs will fail without it and it is specific to each kernel version.


All of these things were explained reasonably in
https://help.ubuntu.com/community/LiveCDCustomization#Boot_init

Enjoy,
Alex





More information about the Osgeolive mailing list