Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have an old PC (Pentium 4) and a new PC (dual core). On old PC I do not have a DVD ROM or a CD ROM. The motherboard does not let me boot from a USB key. And I do not have a NIC which can boot and install from a TFTP server.

I would like to install Debian Squeeze on old PC by using new PC. My plan is

  • To plug a new hard drive on the new PC as a slave and create a partition on it where I will put the installation files

  • To install GRUB on that hard drive to boot that install partition.

After that, I will plug this hard drive on the old PC as a master and let GRUB do the installation.

I think I can do the first step but I am a lost with the second.

Can you show me the steps I must follow?

share|improve this question

3 Answers 3

up vote 1 down vote accepted

You could either:

A - Disconnect the bootdrive in the install machine and install debian normally and then move the drive into the target.

B - Use debootstrap on the install machine; You will need to create the partition layout you want and then run debootstrap to install the userland. You can then chroot into the new userland and setup a kernel, grub, fstab etc. (Yes, a lot of manual work!)

C - Use qemu or something similar that can do raw disk access to install debian directly to the drive and then move it into the target machine.

D - Investigate using the hd-install media. You can probably create your partition layout with partition for swap and put the debian-installer files on the swap partition.. You would install from the swap partition (making sure it doesn't get overwritten by the installer) and then once you are booted into the installed system run mkswap and fix the fstab up.

If you do the install on a newer machine you might find that some modules the old machine needs to boot don't go into your initramfs.. you can work around that once you get it installed.

share|improve this answer
    
Does A is really possible with different hardware ? I mean, they have different cpu, different motherboard. I will not try B ! I will try C but with virtualbox. D was my first thought. It seems have a big amount of work like B. –  Remi Wilde May 12 '12 at 14:47
    
Yes. I have done it. The only issue you may have is that some module needed by the IDE/SATA chipset doesn't go into the initramfs which will mean the kernel can't mount root. You will be able to work around that by configuring the initramfs scripts to include the needed modules and regenerating it on the machine you are using to do the install. You probably won't need to though. Your other hardware will be supported by modules loaded from the rootfs.. so it doesn't matter if the install hardware is different to the target. –  user1104505 May 12 '12 at 14:50
    
I will try C with virtualbox –  Remi Wilde May 12 '12 at 15:06
    
Good luck :). Learning how debootstrap works might be useful at some point. With deboostrap you can install debian on embedded machines like ARM or SH4.. or replace another linux distro without physical access to the machine. –  user1104505 May 12 '12 at 15:12

For this scenario I always have an old IDE CD drive lying around that I temporarily connect for the installation. That's in my opinion the easiest solution.

With your solution you might run into connection problems (PATA vs. SATA) depending on the age of the hardware.

share|improve this answer
    
Just bought a ide 2 sata connector :) –  Remi Wilde May 12 '12 at 14:37

I did part of that a long time ago. I was using lilo at that the time, and I managed to convince lilo to write to the second disk, for booting as primary disk. I think I used /dev/sdb in the lilo.conf, with some setting that said /dev/sdb is bios disk 0x80.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.