Installing Debian Squeeze from Hard Disk

Unfortunately the Debian installer does not work on my Dell desktop box.  I still wanted to do a fresh install of Squeeze, and the only sensible option for me was to install off hard disk.  I have been having the same issue for several months and I have not been able to solve it myself, and nobody responds to my bug report…  However, this hard drive method may work well even if I have a working install USB stick/CD media.

I assume that a working Linux installation exists on the system already; it will only be used to launch the installer.  (In practice, I used an existing Lenny installation to go through this procedure, only to wipe it over with Squeeze.)  For this note I use the Debian installer beta 2 for Squeeze (AMD64).

Create a partition large enough to hold a netinst .iso image (~ 170 MB) plus maybe 20 MB for kernel image and whatnot.  For illustration, I assume it is at /dev/sda11. Move to a temporary working directory, download some files, mount the partition, and copy files to the install partition:

$ wget http://ftp.nl.debian.org/debian/dists/testing/main/installer-amd64/current/images/hd-media/initrd.gz
$ wget http://ftp.nl.debian.org/debian/dists/testing/main/installer-amd64/current/images/hd-media/vmlinuz
$ wget http://cdimage.debian.org/cdimage/squeeze_di_beta2/amd64/iso-cd/debian-squeeze-di-beta2-amd64-netinst.iso
$ mkdir mnt
$ sudo mount /dev/sda11 mnt
$ sudo cp initrd.gz mnt
$ sudo cp vmlinuz mnt
$ sudo cp debian-squeeze-di-beta2-amd64-netinst.iso mnt/netinst.iso
$ sudo umount /dev/sda11

Now I need to modify the GRUB menu to add an entry for the installer that I just made.

For the new GRUB version 2, an entry in /boot/grub/grub.cfg looks a bit complicated:

menuentry 'Squeeze Installer Beta 2' --class debian --class gnu-linux --class os {
  insmod part_msdos
  insmod ext2
  set root='(hd0,msdos11)'
  search --no-floppy --fs-uuid --set SOMELENGTHYHASH
  echo 'Loading Squeeze installer'
  linux /vmlinuz root=UUID=SOMELENGTHYHASH
  echo 'Loading init ramdisk'
  initrd /initrd.gz
}

Here, the root in which the install partition is the eleventh partition of the first hard drive (hence hd0, msdos11). With the lengthy UUID hash for the hard drive, I’d just copy one of the GRUB entries for working installations.

For an old version of GRUB, an entry in /boot/grub/menu.lst would look like this:

title  Squeeze Installer Beta 2
root   (hd0,10)
kernel /vmlinuz
initrd /initrd.gz

This means the install partition is located at the 11th partition of the first hard drive, and the paths to the kernel and initrd images are located at the topmost level of the partition. This is the sort of entry I copy and paste from other entries in /boot/grub/menu.lst.

After reboot, select the menu entry just added and I will be starting the installer right away!

IMPORTANT: When I partition the drive during the installation process, do not mount the install partition.  If I do, the partitioning and the subsequent installation will fail.

This entry was posted in Uncategorized and tagged , , , , , , . Bookmark the permalink.

5 Responses to Installing Debian Squeeze from Hard Disk

  1. Pingback: Installing Debian Squeeze on Dell XPS 630i « Biboroku

  2. Pingback: Installing Debian Squeeze from Hard Disk | Debian-News.net - Your one stop for news about Debian

  3. Denis Pshenov says:

    This is exactly what I need right now. However can you please explain this line:

    linux /vmlinuz root=UUID=SOMELENGTHYHASH

    What will UUID be here?

    At the moment when I try to boot the install partition, it says file no found.

  4. René F. Franke says:

    Thanx for that hint. Works great. But the somewhat easier (and kind of self-explaining) alternative to edit grub.cfg is to my mind adding an entry like

    menuentry “Debian Installer FromISO” {
    loopback loop (hd0,11)/netinst.iso
    linux (hd0,11)/vmlinuz
    initrd (hd0,11)/initrd.gz
    }

    to a script within /etc/grub.d/ (i.e. 40_custom) and running update-grub afterwards.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>