An amateur guide to Debootstrap (installing onto ext4)

Share your own howto's etc. Not for support questions!

An amateur guide to Debootstrap (installing onto ext4)

Postby jongi » 2009-05-21 06:34

The following were used as reference: ... 03.html.en

- I first installed a working debian using the xfce install CD (/dev/sda1)
- I also created a separate /boot partition (ext3) on /dev/sda3 during the install
- I installed with grub (and not grub2)
- I then self-compiled a kernel with ext4 support. For these purposes I had compiled in /usr/src/linux- so the kernel deb files were created in /usr/src. One can obviously install onto any filesystem supported by the kernel you choose to install.
- I also did this process in a root terminal in X. Helps with being able to do other stuff and also with copy and paste capabilities. Sort of a LiveCD environment if you will.
- In this example I have installed sid. You can for instance install lenny by changing the sid references.

Setup ext4 partition and mount
Code: Select all
# cd /
# mkfs.ext4 /dev/sda2
# mkdir /sid-root
# mount /dev/sda2 /sid-root

Download the files to the the new partition. The url can be changed to reflect your nearest mirror. sid can eb replaced with lenny (and I suspect squeeze - I have tested lenny but nt squeeze)
Code: Select all
# debootstrap --verbose sid /sid-root

Setup some of the system environment on the working install onto the new install
Code: Select all
# mount –t proc none /sid-root/proc
# mount –o bind /dev /sid-root/dev
# cp /etc/fstab /sid-root/etc/fstab
<change entry pointing to root from /dev/sda1 to /dev/sda2 on /sid-root/etc/fstab>
# cp /etc/hosts /sid-root/etc/hosts
# cp /etc/network/interfaces /sid-root/etc/network/interfaces
# cp /etc/kernel-img.conf /sid-root/etc/kernel-img.conf
# cp /usr/src/linux-*.deb /sid-root/usr/src/linux

Enter new installation to finalise installation
Code: Select all
# chroot /sid-root /bin/bash
# aptitude install locales
# dpkg-reconfigure locales
# aptitude install console-data
# dpkg-reconfigure console-data
# aptitude install bzip2 binutils initramfs-tools yaird grub
# dpkg –i /usr/src/linux-*.deb
# passwd
<enter root password>
# exit

Final touches
Code: Select all
# cp /et/apt/sources.list /sid-root/etc/apt.sources.list
# cat /sid-root/boot/grub/menu.lst
<cp the section pointing to entry>
# nano /boot/grub/menu.lst
<paste the content from above. Change the title to something like [b]Debian (Ext4)[/b] to distinguish>[code]

Reboot into new system
# umount /sid-root/proc /sid-root/dev /sid-root
# reboot[/code]

I did the below after rebooting into the new system and logging in as root

Setup a normal user
# adduser –a –G <groups sepereated by commas> -s /bin/bash <username>[/code]

And you may want a desktop environment. I went with xfce4
# aptitude install xfce4 xdm

Those with more experience highlight areas that can be streamlined etc.
Desktop: Debian (Sid) 64-bit, Gentoo 64-bit and Ubuntu Jaunty 64-bit
Laptop: Gentoo 32-bit
MythTV: Debian (Testing) 32-bit
Posts: 477
Joined: 2007-04-15 02:41

Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 4 guests