Difference between revisions of "Grub"

From I.N.F.N. Wiki
Jump to: navigation, search
 
Line 15: Line 15:
  
  
Altro esempio GRUB
+
Altro esempio GRUB<br><br>
Le cose fatte sono state le seguenti:
+
Le cose fatte sono state le seguenti:<br>
1) Boot con tomsrtbt linux.
+
1) Boot con tomsrtbt linux.<br>
2) Mount della root di linux (hda3 nel caso) sotto /mnt/hda3/
+
2) Mount della root di linux (hda3 nel caso) sotto /mnt/hda3/<br>
3) chroot /mnt/hda3
+
3) chroot /mnt/hda3<br>
4) /sbin/grub
+
4) /sbin/grub<br>
 
+
<br>
>  Probing devices to guess BIOS drives. This may take a long time.
+
>  Probing devices to guess BIOS drives. This may take a long time.<br>
> GRUB  version 0.92  (640K lower / 3072K upper memory)
+
> GRUB  version 0.92  (640K lower / 3072K upper memory)<br>
> Minimal BASH-like line editing is supported.  For the first word, TAB lists possible command completions.
+
> Minimal BASH-like line editing is supported.  For the first word, TAB lists possible command completions.<br>
> Anywhere else TAB lists the possible  [completions of a device/filename. ]
+
> Anywhere else TAB lists the possible  [completions of a device/filename. ]<br>
 
+
<br>
> grub> root (hd0,2)
+
> grub> root (hd0,2)<br>
> Filesystem type is ext2fs, partition type 0x83
+
> Filesystem type is ext2fs, partition type 0x83<br>
> grub> setup (hd0)
+
> grub> setup (hd0)<br>
>  Checking if "/boot/grub/stage1" exists... yes
+
>  Checking if "/boot/grub/stage1" exists... yes<br>
>  Checking if "/boot/grub/stage2" exists... yes
+
>  Checking if "/boot/grub/stage2" exists... yes<br>
>  Checking if "/boot/grub/e2fs_stage1_5" exists... yes
+
>  Checking if "/boot/grub/e2fs_stage1_5" exists... yes<br>
>  Running "embed /boot/grub/e2fs_stage1_5 (hd0)"...  22 sectors are embedded.
+
>  Running "embed /boot/grub/e2fs_stage1_5 (hd0)"...  22 sectors are embedded.<br>
> succeeded
+
> succeeded<br>
>  Running "install /boot/grub/stage1 (hd0) (hd0)1+22 p (hd0,2)/boot/grub/stage2
+
>  Running "install /boot/grub/stage1 (hd0) (hd0)1+22 p (hd0,2)/boot/grub/stage2<br>
> /boot/grub/grub.conf"........
+
> /boot/grub/grub.conf"........<br>
 
+
<br>
> grub> quit
+
> grub> quit<br>
 
+
<br>
5) exit
+
5) exit<br>
6) umount /dev/hda3
+
6) umount /dev/hda3<br>
7) reboot
+
7) reboot<br>

Latest revision as of 15:01, 3 March 2014

mkdir disk

mount /dev/sda1 disk # sda1 deve contenere la partizione root e la partizione boot

  1. mount /dev/sda2 disk/boot # solo se la partizione di boot è separata

mount --bind /dev/ disk/dev/

mount -t proc none disk/proc

chroot disk /bin/bash

grub-install /dev/sda # se il disco su cui installare è sda


Altro esempio GRUB

Le cose fatte sono state le seguenti:
1) Boot con tomsrtbt linux.
2) Mount della root di linux (hda3 nel caso) sotto /mnt/hda3/
3) chroot /mnt/hda3
4) /sbin/grub

> Probing devices to guess BIOS drives. This may take a long time.
> GRUB version 0.92 (640K lower / 3072K upper memory)
> Minimal BASH-like line editing is supported. For the first word, TAB lists possible command completions.
> Anywhere else TAB lists the possible [completions of a device/filename. ]

> grub> root (hd0,2)
> Filesystem type is ext2fs, partition type 0x83
> grub> setup (hd0)
> Checking if "/boot/grub/stage1" exists... yes
> Checking if "/boot/grub/stage2" exists... yes
> Checking if "/boot/grub/e2fs_stage1_5" exists... yes
> Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 22 sectors are embedded.
> succeeded
> Running "install /boot/grub/stage1 (hd0) (hd0)1+22 p (hd0,2)/boot/grub/stage2
> /boot/grub/grub.conf"........

> grub> quit

5) exit
6) umount /dev/hda3
7) reboot