L2200: partitions and debootstrap

fdisk $CF_CARD
Setup the partitions so the first isn’t too big for the N2200 BIOS to mount. I recommend 256-512 MB for the first primary partition. Then partition further systems along your personal own conviction for /usr, /var or even /home. Remember that apt will want to cache stuff in /var/cache/apt/archives, unless you do a magic ftpfs mount of kernel.org 🙂

Following this you can re-insert the CF card (or udevadm trigger I suppose) or probe your new partitions to get UUID values for your future fstab. My list turned out to be the following. Your UUIDs and drive names will differ:

# ls -l /dev/disk/by-uuid|grep sdd
51c371e3-45ca-4ed0-ac9b-1401db7a8ce9 -> ../../sdd5
81f94c5b-4319-4c3c-b413-36634c32e708 -> ../../sdd7
cb7bbb36-b65f-4e29-88a6-e9b36f44e2a0 -> ../../sdd8
cb880d31-9509-46e2-90c6-7fc2e9189c17 -> ../../sdd6
eee1b774-5bc4-41e4-a469-8ca58dbe88b8 -> ../../sdd1


After making filesystems (use ext2 for / at least), mount it somewhere smart and debootstrap a system. Of course, you need debootstrap for this, which is in the default Ubuntu repository at least. To avoid having to create your own /dev nodes, include udev in the minbase variant of your favorite deb-based system. gpgvapt-utilscronntpdateopenssh-server as well as vim-tiny are also good for your health. To make your internet life easier, the netbase utilities, iputils-ping and a dhcp client are recommended.
debootstrap --variant=minbase --include=udev,gpgv,apt-utils,cron,ntpdate,openssh-server,vim-tiny,netbase,iputils-ping,dhcp3-client jaunty /mnt/l2200

Edit your debootstrapped system’s hostname, chroot into the environment, set the root password for future use and then open up /etc/fstab to make sure your partitions are mounted at boot. You might have to alias vim=vim-tiny.
# echo l2200 > /mnt/l2200/etc/hostname
# chroot /mnt/l2200
@l2200:/# passwd root
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
@l2200:/# vim /etc/fstab

Now. Time to get your UUIDs ready and setup your /etc/fstab. An easy way to get a pastable output is the command for i in /dev/sdd?; do echo -en “#$i\nUUID=” ; sudo vol_id –uuid $i; done

# L2200 /etc/fstab config for MMN-o
proc    /proc   proc    defaults        0 0
tmp     /tmp    tmpfs   defaults        0 0
UUID=eee1b774-5bc4-41e4-a469-8ca58dbe88b8       /       auto    defaults        0 0
UUID=51c371e3-45ca-4ed0-ac9b-1401db7a8ce9       /usr    auto    defaults        0 0
UUID=cb880d31-9509-46e2-90c6-7fc2e9189c17       /var    auto    defaults        0 0
UUID=81f94c5b-4319-4c3c-b413-36634c32e708       /srv    auto    defaults        0 0
UUID=cb7bbb36-b65f-4e29-88a6-e9b36f44e2a0       /var/cache/apt/archives auto    defaults        0 0

Just to make this complete, we’ll add network settings as well. That’s in /etc/network/interfaces

# L2200 /etc/network/interfaces for MMN-o

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

Running dpkg-reconfigure -p high -a (which will take a while and require some input) is a rather easy way to make your system behave without screaming about various problems related to a totally unconfigured system. If you want fanatic control over the settings, do it with -p low.

Now, all we should need is a kernel. That’s quite a bit of trickery, so it’ll need a second blog post.

Lämna ett svar

E-postadressen publiceras inte. Obligatoriska fält är märkta *