Difference between revisions of "Grub"
(Created page with "mkdir disk mount /dev/sda1 disk # sda1 deve contenere la partizione root e la partizione boot #mount /dev/sda2 disk/boot # solo se la partizione di boot è separata mount -...") |
|||
Line 12: | Line 12: | ||
grub-install /dev/sda # se il disco su cui installare è sda | 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 |
Revision as of 14:59, 3 March 2014
mkdir disk
mount /dev/sda1 disk # sda1 deve contenere la partizione root e la partizione boot
- 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