FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 09-15-2012, 08:45 PM
Andrei POPESCU
 
Default Grub2 with multiple Debians

On Sb, 15 sep 12, 19:03:28, Hendrik Boom wrote:
> On Sat, 15 Sep 2012 13:39:29 +0300, Andrei POPESCU wrote:
> >
> > I've solved this by having one grub in the MBR and installing each grub
> > in the corresponding first sector of the partition. Not recommended by
> > grub, but it works.
>
> So each system-specific grub would. presumably, boot just that system.
> And what would the MBR grub do? Chainload a boot-time choice the others?

Yes.

> And how would these be protected against the script that updates the grub
> configuration when the package-manager installs a new kernel during a
> routine upgrade?

'dpkg-reconfigure grub-pc' allows you to specify where grub will be
installed/updated on upgrades. The MBR grub is updated by hand if
needed. I put the squeeze grub there to reduce this to a minimum.

Kind regards,
Andrei
--
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic
 
Old 09-15-2012, 08:46 PM
Andrei POPESCU
 
Default Grub2 with multiple Debians

On Sb, 15 sep 12, 18:52:27, Hendrik Boom wrote:
>
> (That assumes, or course, that /etc is in the root partition and not
> separately mounted. But if it was separately mounted, there would be no
> way for it to read /etc/fstab in order to find out what to mount for /
> etc.)

AFAIK /etc is one of the very few folders that has to be on /

Kind regards,
Andrei
--
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic
 
Old 09-15-2012, 11:06 PM
lee
 
Default Grub2 with multiple Debians

Dmitriy Matrosov <sgf.dma@gmail.com> writes:

> On 09/15/12 18:23, lee wrote:
>>
>> Can't we have a boot manager which is independent of the installed OSs?
>> Grub kinda does its own thing already, and if there was something like a
>> standardised API through which OSs could tell the boot manager how they
>> are to be booted, we would install the boot manager as the first thing
>> and only once. Then we could install as many OSs (or at least Linux
>> versions that comply with the standard) as we like, each of them telling
>> the boot manager how to boot them. You wouldn't have the problem you
>> have now anymore.
> All of this can be implemented with grub (grub2 at least). And one of the
> approaches, is to have (main) grub config, which loads OS-specific ones. The
> main grub config should only know where to find OS-specific ones and should
> _not_ be updated by update-grub from any OS. The os-specific ones, on the
> other hand, should be updated by update-grub from corresponding OS. The
> main config must be updated either manually, or by some other method (using
> standardized API, as you said). Anyway, this is exactly what described in
> article i mention earlier. And may be it's a bit complicated, but it works.

Yes, that's way too complicated. What I have in mind, as far as
simplicity is concerned, is something more like what you do in the BIOS
when you tell it from what disk to boot. It doesn't need to somehow be
invented, installed and maintained by me because it's already there.
The BIOS figures out which disks are available automatically and
presents me with a list I can chose from.

Just give me a CD I can boot from and optionally use to reserve a small
partition on a disk to install this boot manager so that I don't need to
keep the CD in the drive. This boot manager would present me with a
list of OSs I can boot just like the BIOS presents me with a list of
disks to boot from.

That might be what they intended with grub. The result is something
even more complicated than lilo, and I never figured out any of lilo or
grub. I can only hope they work, and if I have to change disks or
change partitioning in a way that requires changing grub, I have a major
problem. Last time I checked, documentation for grub was like
non-existent --- and I really don't want to mess around with it, I just
want it to work and easy to use. I can't install or update grub when
(after a change) I can't boot the OS which grub is supposed to boot.
Messing around with it scares the hell out of me because for all I know
I can be left with an unbootable system, so I don't do that. That's just
great ...

>> What if you install a tiny minimal Linux version only to get grub
>> installed and exclusively use that version of grub for booting? The
>> Debian installer and the package management would have to be fine
>> without installing or updating grub, and you would have to boot into
>> your minimal version to update grub from there. Is that possible?
>>
>>
> Grub from this minimal linux should somehow figure out which OS root
> corresponds to which kernel, or where to find /boot corresponding to some
> OS. Default grub2 scripts can't do this (at the time, when i have checked).

That seems to be exactly the problem the OP has. It's something the
standardised API would cover by requiring OSs to give this kind of
information to the boot manager ...

What sense does it make that grub needs to figure out information like
this? Why doesn't the OS just tell it?


--
Debian testing amd64


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87627ej37f.fsf@yun.yagibdah.de">http://lists.debian.org/87627ej37f.fsf@yun.yagibdah.de
 
Old 09-16-2012, 12:30 PM
Dmitriy Matrosov
 
Default Grub2 with multiple Debians

On 09/16/12 00:45, Andrei POPESCU wrote:

On Sb, 15 sep 12, 19:03:28, Hendrik Boom wrote:


On Sat, 15 Sep 2012 13:39:29 +0300, Andrei POPESCU wrote:



I've solved this by having one grub in the MBR and installing each grub
in the corresponding first sector of the partition. Not recommended by
grub, but it works.



So each system-specific grub would. presumably, boot just that system.
And what would the MBR grub do? Chainload a boot-time choice the others?



Yes.


So, the MBR grub must have separate config, which is maintained (i
guess) by hand,

and have menuentries, which chainload other grubs. In other words, this
MBR grub's

config hardcodes pathes to system-specific grubs. So, if something
change in the

partition layout (e.g. you install yet another linux distribution), you
need to

manually update MBR grub's config. Am i right? If so, what is
difference with

loading another config (`configfile`) instead of chainloading
(`chainloader`)

another grub? Well, i do not mean the difference, that in your case
each grub

will have all modules in its own grubdir, whereas in my case there is
only one

grubdir for all OSes, but many configs. I mean what is the difference
in using

this scheme? Has it some considerable advantages? E.g. is it much
simpler?

Or what?



But, anyway, answering to the above question has sense only, if it is
possible to

install such scheme, but i can't do it. dpkg-reconfigure either does
not ask where

to install, or grub-install refuses to do so. I don't know how
dpkg-reconfigure works

(and don't want to know), but if i use grub-install from cmd it refuses
to install into

partition as well. I think, this is because grub have already been
installed into mbr.

And this is expected behavior, though, as noted in [1]:



At least on BIOS systems, if you tell grub-install to install GRUB
to a

partition but GRUB has already been installed in the master boot
record,

then the GRUB installation in the partition will be ignored.



May be i miss some option, but to be honest i do neither try hard to
figure out why it

refuses, nor i try to look into sources.* Well, probably just because
scheme with different

configs works fine for me.





[1]:
http://www.gnu.org/software/grub/manual/html_node/GRUB-only-offers-a-rescue-shell.html#GRUB-only-offers-a-rescue-shell
 
Old 09-17-2012, 02:24 PM
Chris Bannister
 
Default Grub2 with multiple Debians

On Fri, Sep 14, 2012 at 11:06:42PM +0200, lee wrote:
> Are you referring to grub figuring it out when booting or to grub
> figuring it out while it's being installed? (In any case, I don't know
> any of the answers ...)

tal% less /boot/grub/device.map
(hd0) /dev/disk/by-id/ata-Hitachi_HTS541040G9AT00_MPB2PAXHDBZZUM


--
"If you're not careful, the newspapers will have you hating the people
who are being oppressed, and loving the people who are doing the
oppressing." --- Malcolm X


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: http://lists.debian.org/20120917142418.GE8568@tal
 

Thread Tools




All times are GMT. The time now is 12:41 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org