File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Linux / UNIX and the fly likes Linux Ubuntu Multi-boot Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Linux Ubuntu Multi-boot" Watch "Linux Ubuntu Multi-boot" New topic
Author

Linux Ubuntu Multi-boot

Kinildson Persegueiro
Greenhorn

Joined: Aug 04, 2008
Posts: 12

Hi folks,

First I installed Win XP in /dev/sda5, Win Vista in /dev/sda6 and Win 7 in /dev/sda7.
Then I installed Linux Ubuntu 10.04 in /dev/sda1, mounting "/" in /dev/sda1 and "/home" in /dev/sda9.

How can I make grub2 to recognize all the four operating systems and use them?!

Thanks!

im@mycomputer:/# fdisk -l

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1275 10241406 8e Linux LVM
/dev/sda2 1276 19457 146046884+ f W95 Ext'd (LBA)
/dev/sda5 1276 2550 10241406 7 HPFS/NTFS
/dev/sda6 2551 3825 10241406 7 HPFS/NTFS
/dev/sda7 3826 5100 10241406 7 HPFS/NTFS
/dev/sda8 19124 19457 2682823+ 82 Linux swap / Solaris
/dev/sda9 5101 19123 112639716 83 Linux

PS. tried many things until now, and no deal...
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5836
    
    7

Based on what I have seen in Ubuntu 10.04 (which uses Grub 2), it automatically locates all of your OSes and adds them to grub's boot menu. If it did not, try running this to rebuild the menu:



For your enlightenment the Grub docs are at http://grub.enbug.org/Manual



JBoss In Action
Kinildson Persegueiro
Greenhorn

Joined: Aug 04, 2008
Posts: 12
I ran the command, but nothing changed...
Although the manual says grub 2 supports multiple OS, it doesn't tell anything about how to configure it!

I've read this too:

https://wiki.ubuntu.com/Grub2#User-defined%20Entries



Does anybody have a dual boot with Windows and Ubuntu 10.04? How did you manage that?
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

I don't remember doing anything special. It was autodetected. Try "sudo update-grub".


[My Blog]
All roads lead to JavaRanch
Mahmoud Hossam
Ranch Hand

Joined: Feb 20, 2010
Posts: 74

Kinildson Persegueiro wrote:I ran the command, but nothing changed...
Although the manual says grub 2 supports multiple OS, it doesn't tell anything about how to configure it!

I've read this too:

https://wiki.ubuntu.com/Grub2#User-defined%20Entries



Does anybody have a dual boot with Windows and Ubuntu 10.04? How did you manage that?


I'm currrently dualbooting Win7/Fedora,Windows 7 is on the C: Drive and fedora is on sda5,I guess


your windows installation(s) should be detected by the ubuntu installer

If not,then I fear that you may've lost your installations
Kinildson Persegueiro
Greenhorn

Joined: Aug 04, 2008
Posts: 12
Almost there!

I've edited /etc/grub.d/40_custom



Then



Now I can pick an entry from Grub's menu, Linux is fine but all the Windows leads to a blank screen!
I guess the "menuentry" needs more parameters, well, I'm still searching through the web...

Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5836
    
    7

Personally, I would look at, and debug, 30_os-prober to figure out why it is not recognizing the the Windows OSes that you have on your system. You might also have to go to a grub command line and run some grub commands to figure out exactly what will work.
Kinildson Persegueiro
Greenhorn

Joined: Aug 04, 2008
Posts: 12
30_os-prober is executed when I run "grub-mkconfig", right?
I have no idea why it is not recognizing the other OSes and either how to debug the file...

I've tried to boot Win XP, but it didn't work...
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5836
    
    7

Kinildson Persegueiro wrote:30_os-prober is executed when I run "grub-mkconfig", right?

Yes. But to debug it you can run it by itself.

I have no idea why ... how to debug the file...

The file is a shell script. You can run the individual commands that it is running to see what they do. You can add "echo" statements in key locations to understand the flow and data. I'm sure there are other possibilities. (I saw something about a debug option for grub in the docs...)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Linux Ubuntu Multi-boot