LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-17-2016, 06:15 AM   #1
bikal
Member
 
Registered: Apr 2016
Distribution: Kali linux
Posts: 43

Rep: Reputation: Disabled
"Having problems with multi-booting operating systems"


I have windows 7 ultimate 32-bit installed and backtrack 5 r3 32-bit dual booted on the same hard disk.Now, I want to install android x86 on the same HDD.I have tried installing it while dual booting win 7 and backtrack but after the installation of android x86, backtrack gets removed from the grub boot list.I really want to boot those 3 operating systems in my HDD.
Thanks for help.
 
Old 04-18-2016, 02:47 AM   #2
robertbas
Member
 
Registered: Sep 2006
Posts: 82

Rep: Reputation: 20
can you boot BT manually then update grub?
 
Old 04-18-2016, 04:18 AM   #3
aragorn2101
Member
 
Registered: Dec 2012
Location: Mauritius
Distribution: Slackware
Posts: 567

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
Hi,

Where is your grub installation (i.e. the actual grub.cfg in use)? On the Backtrack partition or the Android partition?
It could have happened that the grub was overwritten and the new one points to a grub.cfg (where the grub menu list is found) on the Android partition.

If it is on the Android partition, you can boot into Android and update grub from there (assuming you have grub in Android).

On the other hand, if the grub is on the Backtrack partition, then try to boot into the Backtrack manually and then update grub from inside there.

I think what you have to enter at the grub command line is:

Code:
> insmod ext2
> set root='(hdX,Y)'
> linux /boot/vmlinuz-${VERSION} root=UUID=${UUID_OF_PARTITION_OF_BACKTRACK} ro text
> initrd /boot/initrd.img-${VERSION}
You should replace hdX by the hard disk you're using (e.g. hd0), and replace Y by the partition number of the Backtrack.
Replace ${VERSION} just after the vmlinuz by your kernel version and ${UUID_OF_...} by the uuid of the partition of the Backtrack.
Finally replace ${VERSION} of the initrd by the version you have in the /boot directory there.

You can have all these information by looking at the /boot directory. The uuid can be obtained by looking into a /dev/disk/by-uuid directory if you have it in Android or from a Live CD.
 
Old 04-18-2016, 07:25 PM   #4
bikal
Member
 
Registered: Apr 2016
Distribution: Kali linux
Posts: 43

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by aragorn2101 View Post
Hi,

Where is your grub installation (i.e. the actual grub.cfg in use)? On the Backtrack partition or the Android partition?
It could have happened that the grub was overwritten and the new one points to a grub.cfg (where the grub menu list is found) on the Android partition.

If it is on the Android partition, you can boot into Android and update grub from there (assuming you have grub in Android).

On the other hand, if the grub is on the Backtrack partition, then try to boot into the Backtrack manually and then update grub from inside there.

I think what you have to enter at the grub command line is:

Code:
> insmod ext2
> set root='(hdX,Y)'
> linux /boot/vmlinuz-${VERSION} root=UUID=${UUID_OF_PARTITION_OF_BACKTRACK} ro text
> initrd /boot/initrd.img-${VERSION}
You should replace hdX by the hard disk you're using (e.g. hd0), and replace Y by the partition number of the Backtrack.
Replace ${VERSION} just after the vmlinuz by your kernel version and ${UUID_OF_...} by the uuid of the partition of the Backtrack.
Finally replace ${VERSION} of the initrd by the version you have in the /boot directory there.

You can have all these information by looking at the /boot directory. The uuid can be obtained by looking into a /dev/disk/by-uuid directory if you have it in Android or from a Live CD.
Thanks for the reply.

I'm really sorry but I wasn't able to understand much from your reply (as I am a newbie).
How can be we manually boot backtrack?

During the installation of android x86 it was said to install/update grub. I entered "yes" so, by the "overwritten of grub" did you mean this?

I wasn't able to understand the code so, would you please explain it for me in simple English.
 
Old 04-20-2016, 08:58 AM   #5
aragorn2101
Member
 
Registered: Dec 2012
Location: Mauritius
Distribution: Slackware
Posts: 567

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
Hi,

Yes, you are confirming what I said. You probably overwrote the existing grub.

When the grub screen appears below the menu there is usually a set of instructions saying:

Press Enter to boot selected OS, 'e' to edit commands before booting and 'c' for a command-line.

Now, you must understand that everything you do is a command, even if you simply click on something, a command gets run in the background. For grub, it is the same. If you simply press enter on a menu option, in the background the grub software will run a specific command corresponding to your choice to boot a particular system.

Now, if you press 'e' instead of pressing Enter, you will actually see that command in full. If you press 'c' you will be directed to a command line where you can enter the command manually, and I agree you have to have some experience to use that command line.

So, you understand that you can boot the Backtrack manually from the command line if you know exactly where it is found, on which hard disk and which partition. The commands I gave previously can potentially do that if you replace the correct values corresponding to your machine.

If the commands do not work, try to use a live CD, mount the Backtrack partition and look at the /boot/grub/grub.cfg file. It is where grub keeps its configurations, and the specific command to boot the Backtrack is found there.

Continue to read around and build some background. There is a solution to every problem on Linux.
 
Old 04-20-2016, 10:37 AM   #6
bikal
Member
 
Registered: Apr 2016
Distribution: Kali linux
Posts: 43

Original Poster
Rep: Reputation: Disabled
Thank you for your reply and your explanation.

So, as far as I know I have to replace "Y" by the no. of partitions of android x86 if I want to manually boot android.
The main problem is that android x86 doesn't create a HDD partition like BT or other OS but, it resides in the windows or BT partition. In my case it is residing in the windows partition of my HDD.

So, what would you like to suggest about my case.
 
Old 04-20-2016, 12:21 PM   #7
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,534

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
Quote:
backtrack gets removed from the grub boot list.
Based on that I would guess you didn't read the android installation how-to which is at the link below and specifically states:

Quote:
Note the installer only creates boot items for Android-x86. If you hope to boot other operating systems, you need to add the item to /grub/menu.lst manually.
http://www.android-x86.org/documents/installhowto

Which means you will need to boot the Android and go to the /boot/grub/menu.lst file and put entries in it manually to boot windows and/or Backtrack. Or you can chroot into Backtrack and re-install Grub2 and update-grub.
 
Old 04-21-2016, 01:17 AM   #8
bikal
Member
 
Registered: Apr 2016
Distribution: Kali linux
Posts: 43

Original Poster
Rep: Reputation: Disabled
Hi

Ignore my earlier reply....

I got everything right but while typing the uuid of backtrack I got confused.
There are many strings in /dev/disk/by-uuid.

How to find the uuid of backtrack from those strings.

Thanks in advance.
 
Old 04-21-2016, 02:49 AM   #9
bluesclues227
LQ Newbie
 
Registered: Apr 2016
Posts: 25

Rep: Reputation: Disabled
Is it possible that nothing was overwritten, but just maybe the boot option didn't show up. You can press add boot option, and without having to type anything go the file names and press the file with the name of the OS your mssing. Then it should list more files (the files should look like example.something) and click on those files, and it should then automatically insert itself.. Then give the boot option a name (I don't think the name matters). However I'm not sure what file it would be though for your OS, just try em all..

Last edited by bluesclues227; 04-21-2016 at 03:34 AM.
 
Old 04-21-2016, 02:55 AM   #10
aragorn2101
Member
 
Registered: Dec 2012
Location: Mauritius
Distribution: Slackware
Posts: 567

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
If you do

Code:
 ls -l
in the directory /dev/disk/by-uuid you will have a long listing format and you will see which uuid is linked to which partition. You simply have to copy the uuid linking to the Backtrack partition.

Make sure the Y from above is replaced by the Backtrack partition's number, and that all the vmlinuz versions are as on the Backtrack partition.

If it does not work, mount the Backtrack partition and browse through the boot directory there and get all the necessary correct information.
 
Old 04-21-2016, 07:45 AM   #11
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,534

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
When you boot Android, navigate to the /boot/grub directory. Do you have a grub.cfg file there? According to the Android site I linked above, it still uses Grub Legacy and if that is the case, there will be no grub.cfg file and all the suggestions above for modifying the grub.cfg file for Grub2 won't help. You can simply put a chainload entry in the menu.lst file of Android pointing to whichever partition holds backtrack then boot it. There is an example entry on the page. If you want to use the Backtrack bootloader, you can then install Grub2 while booted to it and then update grub. I'm not sure how the update-grub will find Android if it's on the same partition as windows but I've not used Android.

Last edited by yancek; 04-21-2016 at 07:48 AM.
 
Old 04-22-2016, 04:47 AM   #12
bikal
Member
 
Registered: Apr 2016
Distribution: Kali linux
Posts: 43

Original Poster
Rep: Reputation: Disabled
Hi

I typed everything on the command line of grub but after pressing enter after the last bit of code
nothing happens.
I have checked everything and it's all correct.
Now, what should I do?

Thanks in advance.
 
Old 04-22-2016, 06:34 AM   #13
aragorn2101
Member
 
Registered: Dec 2012
Location: Mauritius
Distribution: Slackware
Posts: 567

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
Oh, I think I forgot to mention you should type boot at the very end in order for the system to boot.

When you choose an option from the menu, normally grub automatically runs that command at the end, so it does not appear in the grub.cfg file.

Hope everything works for you.
 
Old 04-22-2016, 10:42 AM   #14
bikal
Member
 
Registered: Apr 2016
Distribution: Kali linux
Posts: 43

Original Poster
Rep: Reputation: Disabled
Hi

Everything worked fine for me and I was able to manually boot backtrack successfully.
After, I booted BT I did update-grub.

Update-grub wasn't able to find android x86.
I think it is because it resides on the partition created by windows.

Now, what should I do?
 
Old 04-23-2016, 04:54 AM   #15
aragorn2101
Member
 
Registered: Dec 2012
Location: Mauritius
Distribution: Slackware
Posts: 567

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
Ah, good to hear you could boot BT.

Yes, you guessed it right. Grub will not see the android like that.

I am not sure about the next step, but I will assume that as you can boot into Backtrack manually, you will certainly be able to boot into the Android manually if you know the necessary commands.

But, this time, let us try to add the entry manually to the /boot/grub/grub.cfg file so that you have it as an option when grub boots at startup.

To be clear: all the commands you typed manually to boot the Backtrack can be added to the grub.cfg so that you have the option in the menu, e.g.

Code:
menuentry "Backtrack" {
insmod ext2
set root='(hdX,Y)'
linux /boot/vmlinuz-${VERSION} root=UUID=${UUID_OF_PARTITION_OF_BACKTRACK} ro text
initrd /boot/initrd.img-${VERSION}
}
And you would have that option in your grub menu. NOTE: here you don't have to type the "boot" at the end.

So, similarly, you could add the Android x86 manually to the grub.cfg in Backtrack, assuming that it is the Backtrack's grub which is installed in MBR.

You add something like this:

Code:
menuentry "Android-x86" {
set root=(hdX,Y)
linux /android-${VERSION}/kernel quiet root=/dev/ram0 androidboot_hardware=YOUR_HARDWARE acpi_sleep=s3_bios,s3_mode SRC=/android-${VERSION} DATA= vga=788
initrd /android-${VERSION}/initrd.img
}
http://www.ceh-photo.de/blog/?p=357

Again, there are lots of things you have to replace. A clever way to know how the entry should be is to have a peek at the grub configuration file of the Android x86 on the NTFS partition. Try to read it and I'm sure you will figure it out by yourself.

All the best.

Last edited by aragorn2101; 04-23-2016 at 04:55 AM.
 
  


Reply



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
Multi operating systems sfzab Linux - Software 1 12-06-2005 06:18 PM
multi boot 3 operating systems eddwed Linux - Newbie 1 02-18-2005 07:09 PM
Booting to alternative operating systems nomenclator Linux - Newbie 39 10-15-2004 06:04 PM
Multi processor operating systems norfarm Linux - General 5 08-21-2002 05:08 PM
Booting Up with Multiple Operating Systems Randy-RH7 Linux - Newbie 4 07-03-2001 05:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration