04-27-2010, 01:17 PM
Your Linux Mint can only be chainloaded after grub-install succeeds.
I wouldn't pay too much attention to the Grub2 warning. It is a user's right to specify where the boot loader should be but putting it on a logical partition does have reliability problem if the partition table is altered. I haven't done a lot with Grub2 but my latest Ubuntu is in sda16 and it is controlling the MBR until I recently formatted its partition by mistake. I do run Grub2 on floppy as well as on CD.
In my #164 post I did mention you might have to grub-install it again if it fails. I could not explained why except I suspect a bug inside Grub2. It happened to me before.
04-28-2010, 02:48 AM
This evening i'll try to replace grub2 with grub legacy...
EDIT: I've found the mistake by chainloading Linux Mint 8:
title Linux Mint @ sda8
Last edited by luemmel; 04-28-2010 at 02:04 PM.
04-28-2010, 05:08 PM
I have just installed the latest Ubuntu 10.4 first and then Linux Mint 8 with a new hard disk.
Both use Ext4 filing systems (specified by me) and Grub2.
I did asked the Mint installer to put Grub2 in the root partition sda13 but it failed apparently. This is quite common for Linux boot loaders so nothing to write home about.
When I manually boot Linux Mint, using the Grub2 prompt from Ubuntu, it refused to be chainloaded so I fired it up using the command
After I booted up Linux Mint I do into a "root" terminal and issued the command twice
just to make sure it did what it was told.
I then rebooted Mint, this time by manully chainloading it, and use it to do this reply.
I suppose Grub2 still has some holes in it.
05-10-2010, 12:19 PM
Will This Work for 4 OS, Including Snow Leopard?
This is an excellent read. I'm new to this whole JustLinux thing, and am particlulary interested in booting just "4" operating systems. I would like to know if your method described will work for the 4 OS I would like to load on my machine.
They are the following:
Snow Leopard (PC)
Can I simply follow the steps listed in your guide, or is there a slight difference in the scheme due to having the odd of the MAC Snow Leopard system? I would greatly appreciate it if someone could assist me in this regard. Thanks a million.
05-10-2010, 06:04 PM
Welcome to Justlinux!
I have answered your other thread.
07-11-2011, 02:59 AM
Would be great if you can show off some pics
Or better make some videos and YouTube
You'll be a penguin hero in no time
07-11-2011, 08:01 AM
Welcome to Justlinux!
This thread was written in 2006 at the time the detection of hard disk in Linux was not by libATA. In plain English it was during the time when the IDE hard disk is treated differently to Sata hard disk in Linux by allowing it to have 64 device names (one for the hard disk itself and 63 partitions). All Linux distro installers were written to be installable in 63 partitions of a IDE disks.
Nowadays all hard disks are treated the same as Sata hard disk originally permitted with 16 devices names (one for the hard disk and 15 partitions) and so many installers have not been written to access partition higher than 16. Thus it is technically possible to repeat what I have done but a lot more difficult with modern Linux.
As far as I know Linux does not have a limitation on the number of partitions in a hard disk and I have tried it above 150th position. The gpt partition system can have 128 partitions in a hard disk and these are bootable by Grub2.
The major huddle of putting a large number of operating systems into a PC is the majority of the installers are not written to cope with high number partition numbers and do not know what to do.
If you understand each operating system can be safely installed and booted from a hard disk partition then 145 operating systems are just the same procedure repeated 145 times. It will be terribly boring to look through the screen. I did the thread because to prove the process can be easily managed by Grub.
I still keep the box with these 145 systems but have not maintained it because I only allowed a small partition for each operatings system.
The purpose of my thread is to demonstrate that booting is child play in general but especially in Linux. This thread was written with Grub1 as the boot loader and the same can be done with Grub2.
I have also tried to boot 150 Linux with a MS Windows boot loader bootmgr used by Vista and Win7. That was documented in this thread.
12-20-2014, 03:41 AM
This is a very informative thread! Thanks for the info. It will be very helpful for my current build.
I have been all through this thread and other pages and threads and haven"t found an answer to this question;
Is the layout of the bootloader (Grub, ect.) installed like this VVV
First byte of first track of HD > (|)<(being the very beginning part of the drive)
[example of the first hard drive, HD0/sda]
Start at>| (ie; pure root I suppose)
then | MBR (512 bytes)
then | MBR /bootloader (above + 1048064 = 1MiB)
then | MBR /bootloader /first partition (HD0a/sda1) (starts after first MiB)
Partition Root... (to hold a copy of the bootloader and it's program)
then | MBR /bootloader /first partition (HD0a/sda1) VBR
then | MBR /bootloader /first partition (HD0a/sda1) VBR /rootfolder
then | MBR /bootloader /first partition (HD0a/sda1) VBR /rootfolder/folders
then | MBR /bootloader /second partition (HD0b/sda2)
Partition Root...(C:\ for first OS, ie; dos)
then | MBR /bootloader /second partition (HD0b/sda2) VBR
then | MBR /bootloader /second partition (HD0b/sda2) VBR /rootfolder
then | MBR /bootloader /second partition (HD0b/sda2) VBR /rootfolder/folders
then | MBR /bootloader /third partition (HD0c/sda3)
Partition Root...(D:\ for next OS, or data)
then | MBR /bootloader /third partition (HD0c/sda3)VBR
then | MBR /bootloader /third partition (HD0c/sda3) /root folder
then | MBR /bootloader /third partition (HD0c/sda3) /rootfolder /folders
and so on ???
Just trying to figure out the layout of an HD to get a clearer picture of it....
On another note;
How do you write to a drive or a section of a drive that doesn't even have a partition to write to in the first place???
Is that what the partitioner and bootloader do?
Also, Other than using a partition manager to edit the MBR,
is there another way to edit it in text mode like ie; notepad or Kwrite?
Last edited by noidly1; 12-20-2014 at 11:30 AM.
12-20-2014, 10:57 PM
It has been a while for me, but hexedit will allow you to read and write to a HD, as well as on a file on HD. I think it's something like:
for which ever hard disk you want to look at. By memory, it does show you the contents in hexadecimal.
See: man hexedit
On a console or terminal prompt.
Do be very careful about changing things on a HD or partition.
But, it's fun to look in there. Makes one feel very powerful.
Years ago, someone sold a utility for Windows that did the same thing. I am having a temporary mind blank on the name. Edit: I just Googled. it was part of Norton's utilities, and it was called diskedit. I used it a lot.
Either the Windows (pay program) or hexedit (free in Linux) will let you search. Write a file with really strange text pattern, save it and search for that strange pattern on HD. You can learn how and where files write and rewrite on a HD, if you save it more than once.
12-21-2014, 02:58 AM
Yeah I have that. Only problem is, is trying to get all that hex stuff in English so I can read it... lol
Originally Posted by irlandes
12-22-2014, 11:05 AM
I just opened a terminal, and ran hexedit /dev/sda5
which is correct for my Linux partition.
At the right side of the screen is a column which gives you the data in plain English (or spanish etc.)
In some cases, it will not translate to English. But, if you hit a text file it will be there.
12-26-2014, 02:44 PM
Modern Linux use Grub2. As far as I know in any Linux terminal mode we can use grub-install to repair Grub2.
What you need to do is to first boot up a Linux CD or DVD. Run it to try out the Linux and not install it. You then get a terminal and use the command
if the Linux uses sudo like Ubuntu or
if you are in a root terminal like Debian
However you need to know the partition where Grub2 is residing, mount that partition and then specify which partition you want Grub2 to be installed.
If you have Linux in the 2nd partition of disk sda then it is /dev/sda2 and Grub2 is always in its /boot/grub
To have Grub2 files available from sda2 you use the following commands in a terminal (say in Ubuntu)
If you list the content of /mnt/sda2/boot/grub you will see all the Grub files including its configuration file /boot/grub/grub.cfg.
sudo mkdir /mnt/sda2
sudo mount /dev/mnt/sda2
Now you can tell Grub its Grub partition and the the location Grub2 to be installed. Say let's put it in /dev/sda2 and also /dev/sda
The --force is to force GRub to install in a partition. It is not needed if it is the MBR which is /dev/sda without a partition number attached.
sudo grub-install --force --boot-directory=/mnt/sda2/boot/grub /dev/sda2
Please note MBR (/dev/sda) is not the same as in /dev/sda1.
sudo grub-install --boot-directory=/mnt/sda2/boot/grub /dev/sda
The --root-directcory parameter is to tell which Grub is to be installed because if you are booting several Linux each will have Grub in its own partition.
Grub2 does not like itself to be put in a position other the MBR so it always complains but will execute it if the --force parameter is used. It it still not working repeat the command again.
If Grub2 is in the MBR it will boot itself automatically.
If Grub2 is in a partition then it must be booted by another boot loader including another Grub2.
If you have a Grub2 floppy or CD boot it up and the Linux in sda2 can be fired up using these lines
Each bootloader has the ability to repair itself. I never use hexedit to amend a bootloader.
Last edited by saikee; 12-26-2014 at 02:54 PM.