[med-svn] [Debian Wiki] Update of "DebianMed/LiveCD" by SteffenMoeller

Debian Wiki debian-www at lists.debian.org
Sat Sep 26 09:37:00 UTC 2009


Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Debian Wiki" for change notification.

The "DebianMed/LiveCD" page has been changed by SteffenMoeller:
http://wiki.debian.org/DebianMed/LiveCD?action=diff&rev1=5&rev2=6

  
  The motivation behind this effort is to have the USB stick function like a regular hard drive and provide the basic functionality for some virtual or real machine to do exactly what it is supposed to do (and nothing much else). Again, a compressed file system would be lovely, but plain journaled ext2 seems to allow a good start.
  
- The installation is performed via deboostrap. Then to be added is a bootloader. I tried with grub2, but it reads from hd0 instead of hd1 when tested on a Windows machine, and I failed to change that. If hd0 is correct for a diskless client I cannot tell. The next attempt will be with extlinux, a ext2-compatible syslinux. I'll describe it here once it is proven to work.
+ The installation is performed via deboostrap. Then to be added is a bootloader. I tried with grub2, but it reads from hd0 instead of hd1 when tested on a Windows machine, and I failed to change that. If hd0 is correct for a diskless client I cannot tell. The next attempt will be with extlinux, a ext2-compatible syslinux. The following describes my current state of my attempts:
  
- The big disadvantage of this setup is the self-biting installation, which does not care about removing packages from /var/cache/apt to free disk space during installation. After the debootstrap, one should hence loop over $packages to install, like
+ {{{
+    sudo fdisk /dev/sdb1 # create a partition
+    mke2fs -j /dev/sdb1 # journaled ext2 file system
+    tunefs -c 0 /dev/sdb1 # don't check
+    sudo mkdir /mnt/stick # prepare mount point
+    mount -t ext2 /dev/sdb1 /mnt/stick
  
+    debootstrap squeeze /mnt/stick http://ftp.de.debian.org/debian #  please adjust to your mirror
+ }}}
+ 
+ 
+ A disadvantage of this setup is the self-biting installation, which does not care about removing packages from /var/cache/apt to free disk space during installation. After the debootstrap, one should hence loop over $packages to install, like
+ 
+ {{{
+    chroot /mnt/stick
+    packages="boinc-client autodock autogrid autodocktools gromacs"
- for p in $packages; do echo "Installing $p"; apt-get install $p && apt-get clean; done
+    for p in $packages; do echo "Installing $p"; apt-get install $p && apt-get clean; done
+ }}}
+ 
+ For getting the beast to boot, I attempted the following. The kernel should be installed, first, and the installation inspects the /proc directory, so this is prepared for it, too.
+ 
+ {{{
+ 
+    sudo chroot /mnt/stick # entering the chroot just created
+ 
+    cat /etc/fstab # make sure you really want to overwrite this with
+    echo "Will be overwritten in ten seconds if you don't CTRL-C"
+    sleep 10 # you shall not copy and paste blindly
+    cat > /etc/fstab << EOFSTAB
+ # <file system> <mount point>   <type>  <options>       <dump>  <pass>
+ proc            /proc           proc    defaults        0       0
+ /dev/sdb1       /               ext3    defaults,errors=remount-ro 0       1
+ EOFSTAB
+    mount /proc
+    apt-get install linux-image
+    # answering 'Y' to the questions asked, except the initrd is fine - press "don't cancel"
+ }}}
+ 
+ Now the system should be installed. It was not clear from the documentation about how the configuration file should be named - so some good soul please improve the description given here.
+ 
+ {{{
+    mkdir /boot/extlinux # needed?
+    mkdir /boot/syslinux # or this one?
+    cat > /boot/syslinux/syslinux.cfg <<EOCFG
+ DEFAULT linux
+ LABEL linux
+ SAY Now booting the kernel from EXTLINUX sdb1
+ KERNEL vmlinuz
+ APPEND ro root=/dev/sdb1 initrd=initrd.img
+ EOCFG
+    ln /boot/syslinux/syslinux.cfg /boot/extlinux/extlinux.cfg
+    exit  # now back from the chroot
+ 
+    sudo apt-get install syslinux
+    extlinux -i /mnt/stick
+ 
+    sync # does not help too much with journaled file systems, though
+    umount /mnt/stick
+ }}}
+ 
  
  === Protocol for vmbuilder ===
  



More information about the debian-med-commit mailing list