Not much of an intro here. Since Wheezy the business card installer appears to be gone.
So this is how to "sidtrap" a fresh install. Couldn't let Arch users have all the fun
Grab a Debian based live CD. I tested using the standard Squeeze live ISO and Ubuntu 12.04. The latter being handy for users wanting a web browser to follow this guide plus wireless access. #! should work as well but I did not test it.
The archicture of the Live CD should be the same as intended Sid install achitecture i.e. i686 or AMD64.
This guide reads better for advanced users but post your questions if your lost... Also if their is anything you feel should be updated make a post about it. I'll also try and format it a bit better, I just wanted to get it on the forum, then go to sleep.
Boot to your live cd configure an internet connection, open a terminal and su to to root however your live cd allows, e.g.
create partitons on your disk. This is my setup so adjust for yourself. If you are new or interested about LVM then have a read of el koraco's LVM guide, reserving some disk space is a generally a good idea.
Primary partiton 512M, type = Linux
Remaining disk space as Primary partition, type = LVM
Install LVM (only required if you actually use LVM).
apt-get install lvm2
Load the device mapper module.
Format what will be the /boot partition.
Create a Physical Volume.
Create Volume Group and logical Volumes. I create random names for my volume groups assigned to a variable.
VG=vg$(tr -cd a-zA-Z0-9 < /dev/urandom | head -c 6) vgcreate $VG /dev/sda2 lvcreate -n root -L 8G $VG lvcreate -n log -L 2G $VG lvcreate -C y -n swap -L 4G $VG lvcreate -n tmp -L 2G $VG lvcreate -n home -l +100%FREE $VG lvremove $VG/tmp
Format and mount the partitions
mkfs.ext4 /dev/mapper/$VG-root mkfs.ext4 /dev/mapper/$VG-log mkfs.ext4 /dev/mapper/$VG-home mkswap /dev/mapper/$VG-swap swapon /dev/mapper/$VG-swap mount /dev/mapper/$VG-root /mnt mkdir /mnt/boot mkdir -p /mnt/var/log mkdir /mnt/home mount /dev/sda1 /mnt/boot mount /dev/mapper/$VG-log /mnt/var/log mount /dev/mapper/$VG-home /mnt/home
apt-get install debootstrap
Bootstrap a Sid install (update the URL using your closest mirror).
debootstrap sid /mnt http://mirror.internode.on.net/pub/debian
It will start downloading and installing, hopefully you will receive “Base system installed successfully" at the end. Pat yourself on the back!
Create an fstab. In my case I just needed to tail the last 4 lines of /etc/mtab and replace /mnt where nesessary. Something like...
tail -n 4 /etc/mtab | sed -e 's/mnt//g' -e 's/\/\//\//g' > /mnt/etc/fstab
Otherwise just make it manually.
Manually create a swap entry e.g.
/dev/mapper/vgVSaG9E-swap none swap sw 0 0
Update the fsck order column in the fstab. Afterwards mine looks like this:
/dev/mapper/vgVSaG9E-root / ext4 rw 0 1 /dev/sda1 /boot ext4 rw 0 2 /dev/mapper/vgVSaG9E-log /var/log ext4 rw 0 2 /dev/mapper/vgVSaG9E-home /home ext4 rw 0 2 /dev/mapper/vgVSaG9E-swap none swap sw 0 0
You could replace with UUID's by running blkid, up to you...
allow-hotplug eth0 iface eth0 inet dhcp
echo sidbox.example.local > /mnt/etc/hostname
Mount dev,proc and sys to /mnt
mount -o bind /proc /mnt/proc mount -o bind /dev /mnt/dev mount -t sysfs /sys /mnt/sys
Enter the sid install
chroot /mnt /bin/bash
Do an apt-get update and verify it works.
Install lvm (if your using it).
apt-get install lvm2
apt-get install locales
Edit /etc/locale.gen and uncomment your required locales, then run
locale-gen export LANG=en_AU.UTF-8
(Adjust the LANG for yours obviously)
Set time zone and hw clock
dpkg-reconfigure tzdata hwclock --systohc --utc
apt-get install libnss-myhostname
install the kernel.
apt-get install linux-image-amd64
At this stage you might like to add contrib and non-free to your /etc/sources.list to install missing firmware e.g.
cat /etc/sources.list deb http://mirror.internode.on.net/pub/debian sid main contrib non-free
apt-get install firmware-linux firmware-linux-nonfree apt-get install apt-file apt-file update apt-file --package-only search /lib/firmware/ | xargs apt-get install -y
apt-get install grub2
Select your device from the debconf prompt and hit OK. Watch for any errors and troubleshoot them else your install might not boot.
┌──────────────────────────┤ Configuring grub-pc ├───────────────────────────┐ │ The grub-pc package is being upgraded. This menu allows you to select │ │ which devices you'd like grub-install to be automatically run for, if │ │ any. │ │ │ │ Running grub-install automatically is recommended in most situations, to │ │ prevent the installed GRUB core image from getting out of sync with GRUB │ │ modules or grub.cfg. │ │ │ │ If you're unsure which drive is designated as boot drive by your BIOS, it │ │ is often a good idea to install GRUB to all of them. │ │ │ │ Note: it is possible to install GRUB to partition boot records as well, │ │ and some appropriate partitions are offered here. However, this forces │ │ GRUB to use the blocklist mechanism, which makes it less reliable, and │ │ therefore is not recommended. │ │ │ │ GRUB install devices: │ │ │ │ [*] /dev/sda (250059 MB; ???) │ │ [ ] - /dev/sda1 (536 MB; /boot) │ │ [ ] /dev/dm-0 (8589 MB; vgVSaG9E-root) │ │ │ │ │ │ <Ok> │ │ │ └────────────────────────────────────────────────────────────────────────────┘
Disable recommends (copy and paste this code block if you like)
cat > /etc/apt/apt.conf.d/10recommends <<EOF APT ""; APT::Install-Recommends "false"; EOF
Install desired software - you could do a heap of customisation at this stage if you wanted.
apt-get update apt-get install ssh less vim
You get the idea...
For ceni users (update the URL with a closer mirror).
echo 'deb http://ftp.spline.de/pub/aptosid/debian/ unstable main fix.main' \ > /etc/apt/sources.list.d/aptosid.list
apt-get update apt-get --allow-unauthenticated install aptosid-archive-keyring apt-get update apt-get install ceni
Last but not least set the root password.
You can also create a standard use account, setup sudo etc.
exit from the chroot
then unmount /mnt/sys, /mnt/dev, /mnt/proc, /mnt/home, etc, etc
Reboot your live cd and boot to your new and slick sid system waiting for customisation Configure ceni and off you go!
post boot procedures (to be completed - going to sleep now yawn)
Last edited by jelloir (2012-11-05 04:44:20)
This is the best debootstrap guide out there. Major props for using LVM as well. I wouldn't add the remaining free space to home, otherwise you're missing out on LVM's ability to make a million partitions, but this needs to be stickied and probably spread across the web.
On a side note, the stable business card installer is here and gives you sid install options in advance mode http://www.debian.org/CD/netinst/#businesscard-stable
Such a great post shouldn't go unnoticed!
I agree, I'll sticky it for a while
Excellent... my first sticky, wait... what? @el_koraco, I'll link to your LVM guide with a recommendation on reading that, your right about reserving space, I tend to focus around space reservations for snaphots.
The Testing Business Card Installers are just a little hard to find - you need "mini.iso" from the netboot folder of the Debian Installer subdomain: