LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Search this Thread
Old 06-15-2012, 11:00 AM   #1
ajaygarg
Member
 
Registered: Mar 2010
Location: New Delhi, India
Distribution: Fedora
Posts: 94

Rep: Reputation: 0
Last-Step hurdle in dual boot of Fedora


Hi all.

Well, I must say that making things just right, is a pre-requisite if one even needs to think of a dual-boot system (more so with both distros being Fedora).


Anyways, I will list the steps which I think need to be conveyed, and then I will put forward my query.


1) I first installed F17, using a LiveCD. In this,

a)
I chose "Use the entire space".

b)
I unchecked "Use LVM" option.

c)
This installed F17 on my 500 GB hard disk (without any LVM), and erased all previous OSes (which included windows).




2) Next, I re-installed F17 (!!!!), using LiveCD. In this,

a)
I chose "Create Custom Layout".

b)
Deleted my "/dev/sda4" and "/dev/sda5", thus freeing almost the entire 500 GB (barring space taken by "/dev/sda1", "/dev/sda2" and "/dev/sda3").

c)
Created a 300 GB partition, using the free space, and chose "/" as the mount-point when asked. It resulted in an extended partition structure, which contained "/dev/sda4" as the extended-partition-root; "/dev/sda5" as the 300 GB data partition; and a "Free" (unnamed) chunk of spacee (almost 175 GB).

d)
It asked the place to install the boot-loader. I chose the (default selected) MBR of "/dev/sda".

e)
The installation completed.



3)
Next, I installed F14, using LiveCD. In this,

a)
I chose "Create Custom Layout".

b)
I chose the 175 GB "free" (unnamed) chunk, with "/" as the mount-point. It was appropriately named "/dev/sda6".

c)
I was asked (again) the location for bootloader. THIS TIME, I SIMPLY UNCHECKED THE OPTION, meaning thereby that no boot-loader was installed this time.

d)
The installation completed successfully.




With a prayer in the mouth, I rebooted, and thankfully my earlier (F17) installation was bootable


Now, the thing is, that I DO NOT get the option to boot into F14 during startup. In fact, I haven't been able to boot into F14 anyhow, ALTHOUGH THE PARTITION FOR F14 VERY WELL EXISTS, AS SHOWN BY THE FOLLOWING SHELL COMMANDS, that were run in F17 environment.



Code:
[ajay@localhost ~]$ su -
Password: 

[root@localhost ~]# mkdir qq

[root@localhost ~]# mount -t ext4 /dev/sda6 qq

[root@localhost ~]# ls -l qq/boot
total 19064
-rw-r--r--. 1 root root   114968 Oct 18  2010 config-2.6.35.6-45.fc14.i686
drwxr-xr-x. 3 root root     4096 Oct 22  2010 efi
-rw-r--r--. 1 root root   166756 May 25  2010 elf-memtest86+-4.10
drwxr-xr-x. 2 root root     4096 Aug  5  2010 grub
-rw-r--r--. 1 root root 12562626 Jun 15 15:59 initramfs-2.6.35.6-45.fc14.i686.img
-rw-r--r--. 1 root root  1106254 Oct 22  2010 initrd-plymouth.img
-rw-r--r--. 1 root root   165080 May 25  2010 memtest86+-4.10
-rw-r--r--. 1 root root  1681526 Oct 18  2010 System.map-2.6.35.6-45.fc14.i686
-rwxr-xr-x. 1 root root  3696448 Oct 18  2010 vmlinuz-2.6.35.6-45.fc14.i686





Also, I am listing the contents of /boot, for F17.

Code:
[root@localhost ~]# ls -l /boot
total 23076
-rw-r--r--. 1 root root   118540 May  7 13:51 config-3.3.4-5.fc17.i686
drwxr-xr-x. 3 root root     4096 May 22 16:41 efi
-rw-r--r--. 1 root root   178436 Mar 27 05:11 elf-memtest86+-4.20
drwxr-xr-x. 2 root root     4096 Jun 15 15:47 extlinux
drwxr-xr-x. 2 root root     4096 May 22 16:40 grub
drwxr-xr-x. 6 root root     4096 Jun 15 16:03 grub2
-rw-rw-r--. 1 root root 16645855 Jun 15 15:30 initramfs-3.3.4-5.fc17.i686.img
-rw-r--r--. 1 root root   176760 Mar 27 05:11 memtest86+-4.20
-rw-------. 1 root root  1875345 May  7 13:51 System.map-3.3.4-5.fc17.i686
-rwxr-xr-x. 1 root root  4611776 May  7 13:51 vmlinuz-3.3.4-5.fc17.i686



Finally, I am sure that the solution for having the dual-boot option has got to do with grub.cfg of F17. So, here are its contents ::

Code:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="${saved_entry}"

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd0,msdos5'  1ff89cae-60bc-40fb-9e3c-e16e4850caa3
else
  search --no-floppy --fs-uuid --set=root 1ff89cae-60bc-40fb-9e3c-e16e4850caa3
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Fedora Linux' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-1ff89cae-60bc-40fb-9e3c-e16e4850caa3' {
	load_video
	set gfxpayload=keep
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos5'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd0,msdos5'  1ff89cae-60bc-40fb-9e3c-e16e4850caa3
	else
	  search --no-floppy --fs-uuid --set=root 1ff89cae-60bc-40fb-9e3c-e16e4850caa3
	fi
	echo	'Loading Linux 3.3.4-5.fc17.i686 ...'
	linux	/boot/vmlinuz-3.3.4-5.fc17.i686 root=UUID=1ff89cae-60bc-40fb-9e3c-e16e4850caa3 ro rd.md=0 rd.lvm=0 rd.dm=0 SYSFONT=True  KEYTABLE=us rd.luks=0 LANG=en_US.UTF-8 rhgb quiet 
	echo	'Loading initial ramdisk ...'
	initrd	/boot/initramfs-3.3.4-5.fc17.i686.img
}
submenu 'Advanced options for Fedora Linux' $menuentry_id_option 'gnulinux-advanced-1ff89cae-60bc-40fb-9e3c-e16e4850caa3' {
	menuentry 'Fedora Linux, with Linux 3.3.4-5.fc17.i686' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.3.4-5.fc17.i686-advanced-1ff89cae-60bc-40fb-9e3c-e16e4850caa3' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos5'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd0,msdos5'  1ff89cae-60bc-40fb-9e3c-e16e4850caa3
		else
		  search --no-floppy --fs-uuid --set=root 1ff89cae-60bc-40fb-9e3c-e16e4850caa3
		fi
		echo	'Loading Linux 3.3.4-5.fc17.i686 ...'
		linux	/boot/vmlinuz-3.3.4-5.fc17.i686 root=UUID=1ff89cae-60bc-40fb-9e3c-e16e4850caa3 ro rd.md=0 rd.lvm=0 rd.dm=0 SYSFONT=True  KEYTABLE=us rd.luks=0 LANG=en_US.UTF-8 rhgb quiet 
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initramfs-3.3.4-5.fc17.i686.img
	}
	menuentry 'Fedora Linux, with Linux 3.3.4-5.fc17.i686 (recovery mode)' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.3.4-5.fc17.i686-recovery-1ff89cae-60bc-40fb-9e3c-e16e4850caa3' {
		load_video
		set gfxpayload=keep
		insmod gzio
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos5'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd0,msdos5'  1ff89cae-60bc-40fb-9e3c-e16e4850caa3
		else
		  search --no-floppy --fs-uuid --set=root 1ff89cae-60bc-40fb-9e3c-e16e4850caa3
		fi
		echo	'Loading Linux 3.3.4-5.fc17.i686 ...'
		linux	/boot/vmlinuz-3.3.4-5.fc17.i686 root=UUID=1ff89cae-60bc-40fb-9e3c-e16e4850caa3 ro single rd.md=0 rd.lvm=0 rd.dm=0 SYSFONT=True  KEYTABLE=us rd.luks=0 LANG=en_US.UTF-8 rhgb quiet
		echo	'Loading initial ramdisk ...'
		initrd	/boot/initramfs-3.3.4-5.fc17.i686.img
	}
}
if [ "x$default" = 'Fedora Linux, with Linux 3.3.4-5.fc17.i686' ]; then default='Advanced options for Fedora Linux>Fedora Linux, with Linux 3.3.4-5.fc17.i686'; fi;
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_ppc_terminfo ###
### END /etc/grub.d/20_ppc_terminfo ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Fedora release 17 (Beefy Miracle)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-9a669232-ec18-4571-85da-904db5b24112' {
	insmod part_msdos
	insmod ext2
	set root='hd0,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  f2a4fc34-1b1d-494e-903f-7481e6381302
	else
	  search --no-floppy --fs-uuid --set=root f2a4fc34-1b1d-494e-903f-7481e6381302
	fi
	linux /vmlinuz-3.3.4-5.fc17.i686 root=/dev/sda2
	initrd /initramfs-3.3.4-5.fc17.i686.img
}
submenu 'Advanced options for Fedora release 17 (Beefy Miracle)' $menuentry_id_option 'osprober-gnulinux-advanced-9a669232-ec18-4571-85da-904db5b24112' {
	menuentry 'Fedora release 17 (Beefy Miracle) (on /dev/sda2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-3.3.4-5.fc17.i686--9a669232-ec18-4571-85da-904db5b24112' {
		insmod part_msdos
		insmod ext2
		set root='hd0,msdos1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  f2a4fc34-1b1d-494e-903f-7481e6381302
		else
		  search --no-floppy --fs-uuid --set=root f2a4fc34-1b1d-494e-903f-7481e6381302
		fi
		linux /vmlinuz-3.3.4-5.fc17.i686 root=/dev/sda2
		initrd /initramfs-3.3.4-5.fc17.i686.img
	}
}

### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###



I have been able to have two simultaneous existence of Fedora, with a bootable OS, after 2 days of head-banging, and 10s of installs and re-installs. I will be grateful, if I could let be known as to how to configure, so that I may have the option of dual-boot during startup.


Looking forward to some light.



Thanks and Regards,
Ajay
 
Old 06-15-2012, 12:07 PM   #2
DavidMcCann
Senior Member
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Salix
Posts: 3,189

Rep: Reputation: 814Reputation: 814Reputation: 814Reputation: 814Reputation: 814Reputation: 814Reputation: 814
The answer is probably here:
http://www.dedoimedo.com/computers/grub-2.html

Personally, I've got Legacy Grub on one computer and Lilo on another: there's no way I'd use Grub2!
 
1 members found this post helpful.
Old 06-20-2012, 09:47 AM   #3
ajaygarg
Member
 
Registered: Mar 2010
Location: New Delhi, India
Distribution: Fedora
Posts: 94

Original Poster
Rep: Reputation: 0
Thanks DavidMcCann.

That did it !!!

With some luck, I was able to solve the issue with Grub2 (on F17) as the MBR.


Thanks again.

Regards,
Ajay
 
Old 06-21-2012, 12:28 PM   #4
Lsatenstein
Member
 
Registered: Jul 2005
Location: Montreal Canada
Distribution: Fedora Core 6 XEN
Posts: 199
Blog Entries: 1

Rep: Reputation: 36
This is my easy way, assuming you are on distributions using grub2.
Before you start, check the partitions of the disk using gparted or other. If you are doing a resize, do it now, and then assign all the partitions with some formatted file system (example ext2),
Then using gparted, delete the partition onto which you want to install your next distribution.
Boot the dvd or livecd, and instruct the system to install using the free space (the deleted partition).

This action will use most of the distribution defaults, and create a grub.cfg that
After being asked to remove the live cd or usb, reboot to verify all is OK. I would now copy grub.cfg as a duplicate with the name grub.bak (It is a relatively small file, always nice to have).
To install the next distribution, delete one of the ext2 partitions you created, and go through the above process. A new grub.cfg will be created for you and when you reboot, you should see the two distributions, and if you also had windows on the same drive, you will have an entry for windows.

I did these things 4 times, so I have Fedora 17, Ubuntu 12.4, Debian, Mint 13 and Windows on the same hard disk. I use my usb terrabyte backup for my music and other files, My most used partition rarely exceeded 80 gigs.

Fedora puts grub.cfg in /boot/grub2
Debian, Ubuntu and Mint put it in /boot/grub
One thing to note, is that when you update one distribution, the grub.cfg will be updated.

Always install gparted application. There is a dropdown information tab that gives you the randomized serial number assigned to your partition. That will help you to identify all the other partitions when you are on the distribution you booted.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Step by Step Method for Installing Ubuntu 10.10 on a Windows 7 System (Dual booting) allu john sudhakar Linux - Newbie 2 11-21-2010 01:07 PM
Dual Boot Fedora 8 and XP Not Working Need Step by Step Help kingzappa Linux - Newbie 9 01-19-2009 06:08 PM
Need a step by step instruction to dual boot knoppix and XP on the 1 hdd Andrewt84 Linux - Newbie 2 10-11-2005 07:41 AM
Step by step procedure in replacing Red Hat 9.0 by Ubuntu in my dual boot XP/linux charliemerleau Linux - Software 1 10-04-2005 02:12 AM


All times are GMT -5. The time now is 11:28 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration