How to set up debian or ubuntu with debootstrap: Unterschied zwischen den Versionen

Aus Markus' Wiki
Wechseln zu: Navigation, Suche
(Die Seite wurde neu angelegt: debootstrap Mini-HOWTO Installing a fully fledged Debian or Ububtu linux system on a remote computer through a rescue disk with debootstrap Steps: # take care that de...)
 
Zeile 4: Zeile 4:
 
Steps:
 
Steps:
  
# take care that debootstrap is available on your system
+
# take care that '''debootstrap''' is available on your system
 
# take care that you have a good bandwidth and that downloading 500 MB won't jeopardize your finances!
 
# take care that you have a good bandwidth and that downloading 500 MB won't jeopardize your finances!
# take care of the partition architecture with fdisk on the device where you'd like to install the system
+
# take care of the partition architecture with '''fdisk''' on the device where you'd like to install the system
# format the partitions with a filesystem of your choice. I prefer ext3 (mkfs.ext3). Also, initialize the swap space. (mkswap)
+
# format the partitions with a filesystem of your choice. I prefer ext3 ('''mkfs.ext3'''). Also, initialize the swap space. ('''mkswap''')
 
# mount your file systems in a way you want them to act later on. Use /mnt as the root directory.
 
# mount your file systems in a way you want them to act later on. Use /mnt as the root directory.
# use debootstrap in order to bootstrap the complete base installation into /mnt
+
# use '''debootstrap''' in order to bootstrap the complete base installation into /mnt
# then chroot /mnt
+
# then '''chroot /mnt'''
# take care of the devices: /dev/hda or /dev/sda and their partitions need to have their according node files. If they don't exist, generate them with mknod: mknod /dev/hda b 3 0 and mknod /dev/hda1 b 3 1 and mknod /dev/hda2 b 3 2 and mknod /dev/hda3 b 3 3 etc. For scsi devices proceed accordingly. If you have scsi devices, go and get the major and minor ids from Google... The device names will be /dev/sda, /dev/sda1, /dev/sda2, etc.
+
# take care of the devices: /dev/hda or /dev/sda and their partitions need to have their according node files. If they don't exist, generate them with mknod: '''mknod /dev/hda b 3 0''' and '''mknod /dev/hda1 b 3 1''' and '''mknod /dev/hda2 b 3 2''' and '''mknod /dev/hda3 b 3 3''' etc. For scsi devices proceed accordingly. If you have scsi or serial ATA (SATA) devices, the major ID is '''8''' instead of '''3'''. The device names will be /dev/sda, /dev/sda1, /dev/sda2, etc.
# If you have two identical hard disks and if you want to organize a software raid, please follow this description
+
# If you have two identical hard disks and if you want to [http://ubuntuforums.org/showthread.php?t=408461 organize a software raid, please follow this description]
# pick a kernel with apt-cache search linux | grep kernel. Make sure it corresponds with your CPU. Install it with apt-get install 'kernel package name'. apt will tell you in case you need to configure /etc/kernel-img.conf. It is likely that you have to configure usage of an initrd... I have the following statements in there: "do_symlinks = Yes" and "do_initrd = Yes"
+
# pick a kernel with '''apt-cache search linux | grep kernel'''. Make sure it corresponds with your CPU. Install it with '''apt-get install <kernel package name>'''. apt will tell you in case you need to configure '''/etc/kernel-img.conf'''. It is likely that you have to configure usage of an initrd... I have the following statements in there: '''do_symlinks = Yes''' and '''do_initrd = Yes'''
# install grub. grub needs a directory /boot/grub and a number of files therein. Use dpkg -L grub to find out whereabout the sample files are. Don't forget to copy the stage files over to /boot/grub. Don't forget to set up grub. The German instuctions here are very good.
+
# install grub. grub needs a directory '''/boot/grub''' and a number of files therein. Use '''dpkg -L grub''' to find out whereabout the sample files are. Don't forget to copy the stage files over to '''/boot/grub'''. Don't forget to set up grub. The [http://www.pro-linux.de/t_system/grub-howto.html German instuctions here are very good].
# configure the system to use a shadow password system by shadowconfig on
+
# configure the system to use a shadow password system by '''shadowconfig on'''
# set the root password with passwd
+
# set the root password with '''passwd'''
# edit /etc/fstab in a manner you have mounted the partitions
+
# edit '''/etc/fstab''' in a manner you have mounted the partitions
# turn swap on with swapon /dev/hda1, off course with your swap partition...
+
# turn swap on with '''swapon /dev/hda1''', off course with your swap partition...
# edit /etc/resolv.conf so that your new machine can resolve system names
+
# edit '''/etc/resolv.conf''' so that your new machine can resolve system names
# edit /etc/network/interfaces in order to make your new system reachable on the network
+
# edit '''/etc/network/interfaces''' in order to make your new system reachable on the network
# edit /etc/hosts in order to facilitate network and loopback traffic - even though this is not crucial...
+
# edit '''/etc/hosts''' in order to facilitate network and loopback traffic - even though this is not crucial...
# set the /etc/hostname according to your preferences
+
# set the '''/etc/hostname''' according to your preferences
 
# install the openssh-server in order to log into your new machine from remote. Don't forget this!!  
 
# install the openssh-server in order to log into your new machine from remote. Don't forget this!!  
  
 
Now reboot. The machine should come up with the new kernel.
 
Now reboot. The machine should come up with the new kernel.

Version vom 22. Februar 2009, 22:56 Uhr

debootstrap Mini-HOWTO Installing a fully fledged Debian or Ububtu linux system on a remote computer through a rescue disk with debootstrap

Steps:

  1. take care that debootstrap is available on your system
  2. take care that you have a good bandwidth and that downloading 500 MB won't jeopardize your finances!
  3. take care of the partition architecture with fdisk on the device where you'd like to install the system
  4. format the partitions with a filesystem of your choice. I prefer ext3 (mkfs.ext3). Also, initialize the swap space. (mkswap)
  5. mount your file systems in a way you want them to act later on. Use /mnt as the root directory.
  6. use debootstrap in order to bootstrap the complete base installation into /mnt
  7. then chroot /mnt
  8. take care of the devices: /dev/hda or /dev/sda and their partitions need to have their according node files. If they don't exist, generate them with mknod: mknod /dev/hda b 3 0 and mknod /dev/hda1 b 3 1 and mknod /dev/hda2 b 3 2 and mknod /dev/hda3 b 3 3 etc. For scsi devices proceed accordingly. If you have scsi or serial ATA (SATA) devices, the major ID is 8 instead of 3. The device names will be /dev/sda, /dev/sda1, /dev/sda2, etc.
  9. If you have two identical hard disks and if you want to organize a software raid, please follow this description
  10. pick a kernel with apt-cache search linux | grep kernel. Make sure it corresponds with your CPU. Install it with apt-get install <kernel package name>. apt will tell you in case you need to configure /etc/kernel-img.conf. It is likely that you have to configure usage of an initrd... I have the following statements in there: do_symlinks = Yes and do_initrd = Yes
  11. install grub. grub needs a directory /boot/grub and a number of files therein. Use dpkg -L grub to find out whereabout the sample files are. Don't forget to copy the stage files over to /boot/grub. Don't forget to set up grub. The German instuctions here are very good.
  12. configure the system to use a shadow password system by shadowconfig on
  13. set the root password with passwd
  14. edit /etc/fstab in a manner you have mounted the partitions
  15. turn swap on with swapon /dev/hda1, off course with your swap partition...
  16. edit /etc/resolv.conf so that your new machine can resolve system names
  17. edit /etc/network/interfaces in order to make your new system reachable on the network
  18. edit /etc/hosts in order to facilitate network and loopback traffic - even though this is not crucial...
  19. set the /etc/hostname according to your preferences
  20. install the openssh-server in order to log into your new machine from remote. Don't forget this!!

Now reboot. The machine should come up with the new kernel.