Перейти к основному содержимому
Категории ai career dao links media notes philosophy security systems web
  1. Гисты/

Debian GNU Hurd installation in real hardware

·971 слово·5 минут· ·
Оглавление

Debian GNU Hurd installation in real hardware

Debian_Hurd_Install.md
#

## How to install Debian GNU/Hurd in a real PC
### Debian GNU/Hurd installation guide to real hardware

### Requirements

- An old PC
- DVD-R or CD-R
- Recommended hardware
  - Wired Network Connection
  - CPU with high clock speed
  - AHCI SATA or IDE Hard Disk
  - PS/2 keyboard and mouse
  - `>=` 512 MB RAM
  
### Steps

- **Step 0**: Search an old PC. I recommend to use a CPU with high clock speed. because Hurd only use one logical processor. Also, your PC must be IDE or SATA in AHCI mode.

  Hurd doesn't support USB, so possibly you will need a PS/2 keyboard and mouse.

  To get network connection, you must to use a wired connection. Hurd supports WiFi, but only with a few models, so I recommend to use a wired connection.

- **Step 1**:  Download iso image from https://cdimage.debian.org/cdimage/ports/latest/hurd-i386/ . 

  You can download the latest stable version from here: [DVD](https://cdimage.debian.org/cdimage/ports/current-hurd-i386/iso-dvd/) or [CD](https://cdimage.debian.org/cdimage/ports/current-hurd-i386/iso-cd/). To install the system only CD-1 or DVD-1 is needed. The others images only provides a offline repository with all packages included in Debian. 

  If you download CD-1 image, may you need a Internet connection to install any package during the installation.

  Optionally, you can download the *current* image, the latest build uploaded from developers. This images will be more updated than the official version, but It also can contains many errors or be unstable.
This images only are offered in [CD-1](https://cdimage.debian.org/cdimage/ports/latest/hurd-i386/current/debian-sid-hurd-i386-CD-1.iso)  or   [DVD-1](https://cdimage.debian.org/cdimage/ports/latest/hurd-i386/current/debian-sid-hurd-i386-DVD-1.iso). 

  After download iso image, burn It in a CD or DVD (Hurd don't support USB).


- **Step 2**:  Insert CD/DVD in the computer, and boot from this. 
  When the CD boots, select "*Pseudographical Install*" or "*Text Install*". Optionally, you can to select "*Graphical Install*", but It use to show more errors than the others.

  ![*Installer Main Menu*](https://gist.githubusercontent.com/AlmuHS/f0c036631881756e817504d28217a910/raw/8c92a1da797338f3fb2dc4a7ea7cdb7d7a34774a/installer.png)

- **Step 3**: Follow the steps of the installer. It's possible that installer shows blank blue screen during charge of any step.
  - **Check Network Connection**: In network configuration step, the installer will try to set a network connection via DHCP or, optionally, manual configuration.
  
    ![*Network Configuration*](https://gist.githubusercontent.com/AlmuHS/f0c036631881756e817504d28217a910/raw/5226b182b075e0f33e3655201d973642f8137772/network.png)

    ![*Setting DHCP*](https://gist.githubusercontent.com/AlmuHS/f0c036631881756e817504d28217a910/raw/5226b182b075e0f33e3655201d973642f8137772/network3.png)
  
    If the installer gets network connection, Hurd will have detected correctly the network card. If not, possibly you need to find a compatible NIC (Hurd use driver collection from Linux 2.6.32).
 
  Continue with the next steps.


- **Step 4**: In partitioner step, select "*Guided: use entire disk*".


    ![*Guided partitioning*](https://gist.githubusercontent.com/AlmuHS/f0c036631881756e817504d28217a910/raw/d8bdc231b6f137e304dd98df07cbaf7a121bbd94/partition.png)

    Select your hard disk unit, where you want to install Debian GNU/Hurd

    ![*Select Disk*](https://gist.githubusercontent.com/AlmuHS/f0c036631881756e817504d28217a910/raw/d8bdc231b6f137e304dd98df07cbaf7a121bbd94/partition2.png)

    Then, select "*All files in a one partition*". Hurd can fails if any directory are in a separated partition. (you can try it if want, but in some case could produce errors).

    ![*Partition mode*](https://gist.githubusercontent.com/AlmuHS/f0c036631881756e817504d28217a910/raw/d8bdc231b6f137e304dd98df07cbaf7a121bbd94/partition3.png)

    Press "*Finish partitioning and write changes to disk*" and, in the dialog, select "*Yes*" to apply the changes.


    ![*Finish partitioning*](https://gist.githubusercontent.com/AlmuHS/f0c036631881756e817504d28217a910/raw/d8bdc231b6f137e304dd98df07cbaf7a121bbd94/partition4.png)

    Wait to partitioning and "*Install base system*" steps.
  
    ![*Installing base system*](https://gist.githubusercontent.com/AlmuHS/f0c036631881756e817504d28217a910/raw/0404f358c56da10f2720ce439afd32719f78c699/installbase.png)

- **Step 5**: In *Configure the packages manager* step, when the dialog ask *if you wish to scan another CD or DVD* select "No".

    ![*Scan CD*](https://gist.githubusercontent.com/AlmuHS/f0c036631881756e817504d28217a910/raw/874f9194600f6c1cff87aa32b8b04adb89eaf73e/packages.png)

  Then, It shows a new dialog, asking to *use a network mirror*. Select "Yes".

    ![*Add mirror*](https://gist.githubusercontent.com/AlmuHS/f0c036631881756e817504d28217a910/raw/874f9194600f6c1cff87aa32b8b04adb89eaf73e/packages2.png)

  In the new dialog, select a mirror.

    ![*Select mirror*](https://gist.githubusercontent.com/AlmuHS/f0c036631881756e817504d28217a910/raw/874f9194600f6c1cff87aa32b8b04adb89eaf73e/packages3.png)
 
    ![*Select mirror2*](https://gist.githubusercontent.com/AlmuHS/f0c036631881756e817504d28217a910/raw/874f9194600f6c1cff87aa32b8b04adb89eaf73e/VirtualBox_Debian%2520GNUHurd2_17_08_2018_00_48_17.png)
    
    ![*Select mirror3*](https://gist.githubusercontent.com/AlmuHS/f0c036631881756e817504d28217a910/raw/874f9194600f6c1cff87aa32b8b04adb89eaf73e/packages5.png)

  Wait while apt synchronize the mirror.
  
    ![*Sync apt*](https://gist.githubusercontent.com/AlmuHS/f0c036631881756e817504d28217a910/raw/874f9194600f6c1cff87aa32b8b04adb89eaf73e/VirtualBox_Debian%2520GNUHurd2_17_08_2018_00_49_12.png)

- **Step 6**: In "*Select and Install software*" step, select software in tasksel.
  - In Debian GNU/Hurd 2017, you can to select your favourite Desktop Environment, and other utilities.
  
    ![*Select software*](https://gist.github.com/AlmuHS/f0c036631881756e817504d28217a910/raw/cb9d06e5177a4cde98c698a93588d8dd451cedf3/tasksel.png)
  
  - In Debian GNU/Hurd current image, unselect all. (*Current* images use to fail when select software in tasksel).
  
    ![*Select software in current*](https://gist.githubusercontent.com/AlmuHS/f0c036631881756e817504d28217a910/raw/8f79eb0a6467328382bbf0ac9a6c059952bb1cb9/tasksel2.png)
  
  Wait until software is installed.  

- **Step 7**: In GRUB step, when dialog ask  "*Install the GRUB loader to master boot record*", select "*Yes*".

    ![*Installing GRUB*](https://gist.githubusercontent.com/AlmuHS/f0c036631881756e817504d28217a910/raw/fbb5e991b89bd13e1de69e0b1633f3699ec84e70/grub.png)
    
    ![*GRUB MBR*](https://gist.githubusercontent.com/AlmuHS/f0c036631881756e817504d28217a910/raw/fbb5e991b89bd13e1de69e0b1633f3699ec84e70/VirtualBox_Debian%2520GNUHurd2_17_08_2018_01_29_56.png)

  In the next dialog, select your harddisk unit.

    ![*GRUB unit*](https://gist.githubusercontent.com/AlmuHS/f0c036631881756e817504d28217a910/raw/fbb5e991b89bd13e1de69e0b1633f3699ec84e70/VirtualBox_Debian%2520GNUHurd2_17_08_2018_01_31_29.png)

  Wait until installation finish, and reboot
  
    ![*Finish installation*](https://gist.githubusercontent.com/AlmuHS/f0c036631881756e817504d28217a910/raw/8c92a1da797338f3fb2dc4a7ea7cdb7d7a34774a/finish.png)

    ![*reboot*](https://gist.githubusercontent.com/AlmuHS/f0c036631881756e817504d28217a910/raw/8c92a1da797338f3fb2dc4a7ea7cdb7d7a34774a/finish2.png)

- **Step 8**: Boot the new system and check It starts correctly and the configuration is correctly applied

    ![*Boot system*](https://gist.githubusercontent.com/AlmuHS/f0c036631881756e817504d28217a910/raw/8c92a1da797338f3fb2dc4a7ea7cdb7d7a34774a/boot.png)
 
 
 ### Extra steps
 
 - **Install Ping**: Ping isn't installed by default, but you can install it with
  inetutils-ping package.
  
       # apt install inetutils-ping 

 - **Configure Xorg**: If, during the installation, you have installed any DE; you will needs to configure Xorg.
 
    - **Allow startx**: To allow any user to start xorg, you must to execute this command:
 
          dpkg-reconfigure x11-common xserver-xorg-legacy
       
         ![*Configure xorg*](https://gist.githubusercontent.com/AlmuHS/f0c036631881756e817504d28217a910/raw/8f79eb0a6467328382bbf0ac9a6c059952bb1cb9/xorg-allow.png)
       
       In the dialog, select "*Anybody*".
   
       Execute ` $ startx` (as user) to check that Xorg starts correctly. The first time may during a minutes.
       
   - **Enable ctrl-alt-backspace to kill Xorg**:
   
     To enable this keycomb, create a `/etc/X11/xorg.conf` with this content:
     
     ~~~
     Section "InputDevice"
        Identifier "Generic Keyboard"
        Driver "kbd"
        Option "XkbOptions" "terminate:ctrl_alt_bksp"
     EndSection
     ~~~
   
   - **Install XDM**: In the DE installation, Hurd install lightdm, but It don't runs, so must be replaced by XDM.
   
     You can install XDM with the command:
     
         # apt install xdm
         
      During the installation, a dialog will ask about change Desktop Manager by default. Select "ok" and, in the new dialog, select "xdm"
      
      ![*Configure xdm*](https://gist.githubusercontent.com/AlmuHS/f0c036631881756e817504d28217a910/raw/8f79eb0a6467328382bbf0ac9a6c059952bb1cb9/xdm.png)
      
      ![*Select xdm as default DM*](https://gist.githubusercontent.com/AlmuHS/f0c036631881756e817504d28217a910/raw/8f79eb0a6467328382bbf0ac9a6c059952bb1cb9/xdm2.png)
       
      Execute `# service xdm start` to start the DM
      
      ![*xdm started*](https://gist.githubusercontent.com/AlmuHS/f0c036631881756e817504d28217a910/raw/ab30b949631dc03649f1909e175188864686de94/xdm_login.png)
         
  - **Add main repositories**: In Debian GNU/Hurd 2017, the only repository add by default is `ports`. But, to get more updates, may be interesting to add the Debian official repository.
  
    You can add this, adding this lines to `/etc/apt/sources.list`
    
    	   deb http://deb.debian.org/debian-ports unstable main
         deb-src http://deb.debian.org/debian unstable main
         deb http://deb.debian.org/debian-ports unreleased main

    After add them, execute `apt update` to update the apt index.
      
   - **Allow logout from DE**: By default, when the DE is started using `startx` command, and you try to logout, the DE don't finish correctly and don't return to tty. 
   
     To solve this, we can add setuid to xinit, with this command:
   
         $ chmod u+s /usr/bin/xinit
   
 - **Try the desktop**
 
  ![*Desktop*](https://gist.githubusercontent.com/AlmuHS/f0c036631881756e817504d28217a910/raw/1c240c65a6063f7873dd0e4a04b0da2d0930f7d0/desktop.png)
 
 #### More info: https://www.debian.org/ports/hurd/hurd-install