Editing livecd username and hostname in UCK

I have been creating my Easylinux OS distribution using UCK of late. The main reason I switched to UCK from Remastersys was that the plymouth splash breaks the moment you install Remastersys on Ubuntu 11.04. So have to go about building the hard way!

UCK, Ubuntu Customisation Kit, as most of you might know is another customisation tool which lets you create custom ubuntu based iso. Its more of an advanced user tool. If you are not fussy about plymouth, Remastersys is the best tool for you!

Anyway, getting to the point: UCK by default puts ubuntu as the username and the hostname for the  livecd session. If you want to change that , you would need to edit the /etc/casper.conf file. However, this needs to be edited outside the chroot session, after you have packed the initrd. So, here are the steps you should follow, if you are using any Ubuntu distribution based on  10.04 and after.

Exit the chroot session by pressing Ctrl+D .
Pack the initrd.

$ sudo uck-remaster-pack-initrd ~/tmp/

Now, as root:
# cd tmp/remaster-iso/casper
# mkdir temp
# cd temp
# lzma -dc -S .lz ../initrd.lz | cpio -imvd –no-absolute-filenames
# vi etc/casper.conf  (you must be careful here. don’t type /etc/casper.conf)
Now you can change the livecd username, and host name . Once done, save the file and repack it using the command below.
# find . | cpio –quiet –dereference -o -H newc | lzma -7 > ../initrd.lz
remove the temp file folder
# cd ..
# rm -rf temp/
# exit

Now continue building the iso . You should have your custom username and hostname set.

Sayantan Das

Sayantan is a DevOps Consultant by the day and works mainly with Ansible and Linux . He is a AWS - SA and RedHat Certified Engineer . He loves to tinker with Linux systems .

Leave a Reply

tuxtrixmod
Close Menu
%d bloggers like this: