lost and found ( for me ? )

Showing posts with label grub. Show all posts
Showing posts with label grub. Show all posts

Triple boot : Fedora17’s grub2 has not recognized Linux MInt 14

Three Operating Systems , Win 7 , Fedora 17 and Linux Mint 14 , has been installed in my desktop PC.
Fedora’s Grub2 , which has been installed in MBR , has not recognized Linux Mint 14...

# rpm -qa | grep grub2
grub2-2.0-0.38.beta6.fc17.x86_64
grub2-tools-2.0-0.38.beta6.fc17.x86_64

# uname -ri
3.6.8-2.fc17.x86_64 x86_64

# cat /etc/fedora-release
Fedora release 17 (Beefy Miracle)

Here’s my “fdisk -l” info
# fdisk -l /dev/sda

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xe0a4c958

  Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      206847      102400    7  HPFS/NTFS/exFAT  <- Win7
/dev/sda2          206911   308688974   154241032    7  HPFS/NTFS/exFAT <- Win7
/dev/sda3       308690944   615890943   153600000   83  Linux   <-  Fedora 17
/dev/sda4       615892990   976771071   180439041    5  Extended
/dev/sda5       615892992   632276991     8192000   82  Linux swap / Solaris  <- swap for Fedora n’ Mint
/dev/sda6       632279040   976771071   172246016   83  Linux  <- Linux Mint 14

run os-prober command.
Grub detected Win 7 , however did not detect Linux Mint.
# os-prober
 No volume groups found
/dev/sda1:Windows 7 (loader):Windows:chain

Mount the file system in which Linux Mint has been installed. ( /dev/sda6 )
# mount -t ext4 /dev/sda6 tmp_mount_for_Mint

After mounting the filesystem in which Linux MInt has been installed , os-prober detects both Win 7 and Mint.
# os-prober
 No volume groups found
/dev/sda1:Windows 7 (loader):Windows:chain
/dev/sda6:Linux Mint 14 Nadia (14):LinuxMint:linux

I’m not sure the reason ,, however it seems that os-prober seems to detect OSes which have been mounted.

update grub2
# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.6.8-2.fc17.x86_64
Found initrd image: /boot/initramfs-3.6.8-2.fc17.x86_64.img
Found linux image: /boot/vmlinuz-3.6.6-1.fc17.x86_64
Found initrd image: /boot/initramfs-3.6.6-1.fc17.x86_64.img
Found linux image: /boot/vmlinuz-3.6.5-1.fc17.x86_64
Found initrd image: /boot/initramfs-3.6.5-1.fc17.x86_64.img
 No volume groups found
Found Windows 7 (loader) on /dev/sda1
Found Linux Mint 14 Nadia (14) on /dev/sda6
done

unmount
# umount /home/hattori/tmp_mount_for_Mint

If your grub has not recognized OSes installed , it might be worth to try this.

Solaris 10 x86 : boot Soralis 10 as single user mode


small tips.


on GRUB screen , select “Oracle Solaris 10 8/11 ..” and press “e”

After typing “e” , you will see the following screen.
select “…/multiboot” and then type “e”

add “-s” at the end of line and press “Enter” key.

select  “multiboot …. –s “ and press “b” ( boot )

enter “root password”
Connected to domain solaris10-vm1
Escape character is ^]

Requesting System Maintenance Mode
SINGLE USER MODE

Root password for system maintenance (control-d to bypass):

overwrite grub installed in MBR

I have installed two Linux distributions in my laptop , one is Linux Mint 12 and the other is Fedora 16.

Linux Mint’s grub has been installed in MBR ( /dev/sda )
Fedora’s grub has been installed in /dev/sda1 ( = /boot )

overwrite MBR’s grub with Fedora’s.

on Fedora , issue grub2-install

Fedora# grub2-install /dev/sda

After issuing grub2-install , Fefora’s grub will be installed in MBR ( in this case , /dev/sda )
You could boot both Fedora and Linux Mint after overwriting MBR’s grub with Fedora’s.

grub : MBRに再インストールする方法

-  / と /boot が同じパーティションの場合

# grub-install /dev/hda ( /dev/sda などのハードディスク名 )

-  / と /boot が異なるパーティションの場合

# grub-install --root-directory=/ /dev/hda

今回は、/ と /boot を同じパーティションにしているので、

[root@arizona ~]# grub-install /dev/sda
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

# this device map was generated by anaconda
(hd0)     /dev/sda
[root@arizona ~]# echo $?
0
[root@arizona ~]#

get things done!

Ubuntu 9.10 grub2 から grub へ変更する方法

CentOS と Ubuntu をデュアルブートしているけど、CentOSが起動できない。
MBRには Ubuntu の grub2 がインストールされている。

grub2 になってから、menu.lst ファイルがない。。
で、grub2 から grub に変更し、CentOS が起動できるようにした。

root@alaska:~# mv /boot/grub/ /boot/grub2
root@alaska:~# apt-get remove grub-pc
root@alaska:~# mkdir /boot/grub
root@alaska:~# apt-get install grub
root@alaska:~# update-grub
root@alaska:~# grub-install /dev/sda

/boot/grub/menu.lst に下記を追記。

--

title CentOS (2.6.18-164.9.1.el5xen)
root (hd0,0)
kernel /boot/xen.gz-2.6.18-164.9.1.el5
module /boot/vmlinuz-2.6.18-164.9.1.el5xen ro root=LABEL=/ rhgb quiet
module /boot/initrd-2.6.18-164.9.1.el5xen.img
title CentOS (2.6.18-164.6.1.el5xen)
root (hd0,0)
kernel /boot/xen.gz-2.6.18-164.6.1.el5
module /boot/vmlinuz-2.6.18-164.6.1.el5xen ro root=LABEL=/ rhgb quiet
module /boot/initrd-2.6.18-164.6.1.el5xen.img

--

CentOSも起動できるようになった。

Done!