Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

My goal is to be able to take a customized root file system loaded with the software I want. So far I've created a squashed filesystem using debootstrap and chroot to install the software I want on the system.

The problem I am now running in to.. whenever I boot in to the system, my user accounts that were set up in the chroot do not work. First boot everything works out, second boot I can't log in. That is baffling to me.

Any one know a reason or a place to start looking?

share|improve this question
    
You have to keep searching for the changes you wish to make. Look at the casper scripts and initrd as well as /usr/share and in the libs. –  bodhi.zazen Jan 14 '12 at 15:54
    
Well I got it working. I used the live-boot & live-boot-initramfs-tools to generate an initrd and extlinux for the bootloader. Works like a charm. –  cldfzn Jan 15 '12 at 22:13
add comment

2 Answers

This question was solved by the OP:

Well I got it working. I used the live-boot & live-boot-initramfs-tools to generate an initrd and extlinux for the bootloader. Works like a charm.

share|improve this answer
add comment
up vote 2 down vote accepted

To get a working system with a squashfs filesystem:

sudo apt-get install live-boot live-boot-initramfs-tools extlinux
sudo update-initramfs -u

Create a squashfs file from a bootstrapped or running ubuntu filesystem with whatever packages you want available. https://help.ubuntu.com/community/LiveCDCustomizationFromScratch provides good instructions for creating a debootstrapped system to build on. Format the target drive with ext2/3/4 and enable the bootable flag. Create the folder layout on the target drive and install extlinux:

mkdir -p ${TARGET}/boot/extlinux ${TARGET}/live
extlinux -i ${TARGET}/boot/extlinux
dd if=/usr/lib/syslinux/mbr.bin of=/dev/sdX #X is the drive letter
cp /boot/vmlinuz-$(uname -r) ${TARGET}/boot/vmlinuz
cp /boot/initrd.img-$(uname -r) ${TARGET}/boot/initrd
cp filesystem.squashfs ${TARGET}/live

Create ${TARGET}/boot/extlinux/extlinux.conf with the following contents:

DEFAULT Live
LABEL Live
  KERNEL /boot/vmlinuz
  APPEND initrd=/boot/initrd boot=live toram=filesystem.squashfs
TIMEOUT 10
PROMPT 0

Now you should be able to boot from the target drive in to your squashed system.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.