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-14-2012, 05:54 PM
Camaleón
 
Default Grub2 with multiple Debians

On Fri, 14 Sep 2012 17:12:38 +0000, Hendrik Boom wrote:

> It has been my practice when upgrading between Debian releases to make
> bootable copies of the OS partitions on my hard drive so that if things
> go badly wrong I still have a bootable system. And occasionally, things
> have gone badly wrong, so this was a life-saver.
>
> This wirked fine with LILO and GRUB 1, where I was in control of
> configuratino files and could explicitly specifiy which root partitions
> went with which boot partitions/
>
> But when installing grub2 to an MBR. all this is automated. It looks
> around on the available disks and figures out shoch partition goes with
> which.

With GRUB2 it should be the same. What's what you miss from here? :-?

Any available operating system it detects it will be added as a new entry
to the boot menu. This should happen automatically but can still be done
manually with more or less pain.

> Of course, after I've made my copy (with slight changes to /etc/fstab) I
> have two nearly identical sets of partitions, so it may be tricky to
> tell them apart. Is grub2 clever enough to figure it all out anyway?
> And what data does it use to this end? (so I can make sure it's right!)

I would give it a try and let it GRUB2 do its own way. Should something
fails, you will only need to make some minor adjustments from the
configuration files (probably editing the root partition identifier).

Greetings,

--
Camaleón


--
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/k2vr1c$4lj$13@ger.gmane.org
 
Old 09-14-2012, 08:25 PM
Andrei POPESCU
 
Default Grub2 with multiple Debians

On Vi, 14 sep 12, 17:12:38, Hendrik Boom wrote:
>
> But when installing grub2 to an MBR. all this is automated. It looks
> around on the available disks and figures out shoch partition goes with
> which.

Grub is just a bootloader, you must be thinking about os-prober.

> Of course, after I've made my copy (with slight changes to /etc/fstab) I
> have two nearly identical sets of partitions, so it may be tricky to tell
> them apart. Is grub2 clever enough to figure it all out anyway? And
> what data does it use to this end? (so I can make sure it's right!)

UUIDs? What failure mode(s) do you have in mind, because I can't think
of any.

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

On Fri, 14 Sep 2012 23:25:03 +0300, Andrei POPESCU wrote:

> On Vi, 14 sep 12, 17:12:38, Hendrik Boom wrote:
>>
>> Of course, after I've made my copy (with slight changes to /etc/fstab)
>> I have two nearly identical sets of partitions, so it may be tricky to
>> tell them apart. Is grub2 clever enough to figure it all out anyway?
>> And what data does it use to this end? (so I can make sure it's right!)
>
> UUIDs? What failure mode(s) do you have in mind, because I can't think
> of any.

It probably is os-prober that I mean. The misconfiguration I have in
mind is matching one system's /boot with another systems's /. I've had
it happen on a laptop sometime ago. and it sure messed up my upgrades. I
have no idea how it happened, but it has made me paranoid.

-- hendrik




--
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/k304rc$5pk$4@ger.gmane.org
 
Old 09-14-2012, 08:58 PM
Ralf Mardorf
 
Default Grub2 with multiple Debians

On Fri, 2012-09-14 at 20:42 +0000, Hendrik Boom wrote:
> The misconfiguration I have in mind is matching one system's /boot
> with another systems's /. I've had it happen on a laptop sometime
> ago. and it sure messed up my upgrades. I have no idea how it
> happened, but it has made me paranoid.

IIRC, if the "(set) root" line doesn't fit to the root of the
"linux/kernel line" for grub.cfg or menu.lst, it's possible to boot into
a Linux by booting the kernel of another install, perhaps this will
cause an error instead of booting, however, once I booted a kernel and
root from different Linux installs. Note that I manually edit my
configs, the updater won't do such a mistake.


--
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/1347656324.1276.27.camel@localhost.localdomain
 
Old 09-14-2012, 09:06 PM
lee
 
Default Grub2 with multiple Debians

Hendrik Boom <hendrik@topoi.pooq.com> writes:

> It has been my practice when upgrading between Debian releases to make
> bootable copies of the OS partitions on my hard drive so that if things
> go badly wrong I still have a bootable system.

How did you make such copies?

> This wirked fine with LILO and GRUB 1, where I was in control of
> configuratino files and could explicitly specifiy which root partitions
> went with which boot partitions/
>
> But when installing grub2 to an MBR. all this is automated. It looks
> around on the available disks and figures out shoch partition goes with
> which.
>
> Of course, after I've made my copy (with slight changes to /etc/fstab) I
> have two nearly identical sets of partitions, so it may be tricky to tell
> them apart. Is grub2 clever enough to figure it all out anyway? And
> what data does it use to this end? (so I can make sure it's right!)

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 ...)

There needs to be a way for grub to figure out where to look for its
configuration. Perhaps this information is stored in the MBR when
installing grub. In that case, you would have a problem when grub
cannot find its configuration there anymore (like because the
partitioning has changed) and maybe a problem if it finds the wrong
configuration.


--
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: 87r4q4tiu5.fsf@yun.yagibdah.de">http://lists.debian.org/87r4q4tiu5.fsf@yun.yagibdah.de
 
Old 09-14-2012, 09:37 PM
Joe
 
Default Grub2 with multiple Debians

On Fri, 14 Sep 2012 20:42:21 +0000 (UTC)
Hendrik Boom <hendrik@topoi.pooq.com> wrote:

> On Fri, 14 Sep 2012 23:25:03 +0300, Andrei POPESCU wrote:
>
> > On Vi, 14 sep 12, 17:12:38, Hendrik Boom wrote:
> >>
> >> Of course, after I've made my copy (with slight changes
> >> to /etc/fstab) I have two nearly identical sets of partitions, so
> >> it may be tricky to tell them apart. Is grub2 clever enough to
> >> figure it all out anyway? And what data does it use to this end?
> >> (so I can make sure it's right!)
> >
> > UUIDs? What failure mode(s) do you have in mind, because I can't
> > think of any.
>
> It probably is os-prober that I mean. The misconfiguration I have in
> mind is matching one system's /boot with another systems's /. I've
> had it happen on a laptop sometime ago. and it sure messed up my
> upgrades. I have no idea how it happened, but it has made me
> paranoid.
>

The problem is that update-grub rewrites /boot/grub/grub.cfg. It may be
possible to specify roots and boots in /etc/grub.d/ (I do use a
separate /boot, but I've never needed to try this) or alternatively it
is perfectly possible to edit grub.cfg, but you need to remember to do
so each time update-grub is run, before rebooting. More than once, I've
known versions of grub not deal correctly with a separate /boot, so
I've had to do this until the bug was fixed.

Both update-grub and grub-mkconfig (which it calls) are scripts and
possibly some kind of user warning could be appended to one of them.

Or perhaps if the backup copy were made to a second hard drive (trickier
with a laptop) then os-prober could be trusted not to mix roots and
boots between drives.

--
Joe


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120914223728.0ad00e07@jretrading.com">http://lists.debian.org/20120914223728.0ad00e07@jretrading.com
 
Old 09-14-2012, 10:20 PM
Ralf Mardorf
 
Default Grub2 with multiple Debians

On Fri, 2012-09-14 at 22:37 +0100, Joe wrote:
> On Fri, 14 Sep 2012 20:42:21 +0000 (UTC)
> Hendrik Boom <hendrik@topoi.pooq.com> wrote:
>
> > On Fri, 14 Sep 2012 23:25:03 +0300, Andrei POPESCU wrote:
> >
> > > On Vi, 14 sep 12, 17:12:38, Hendrik Boom wrote:
> > >>
> > >> Of course, after I've made my copy (with slight changes
> > >> to /etc/fstab) I have two nearly identical sets of partitions, so
> > >> it may be tricky to tell them apart. Is grub2 clever enough to
> > >> figure it all out anyway? And what data does it use to this end?
> > >> (so I can make sure it's right!)
> > >
> > > UUIDs? What failure mode(s) do you have in mind, because I can't
> > > think of any.
> >
> > It probably is os-prober that I mean. The misconfiguration I have in
> > mind is matching one system's /boot with another systems's /. I've
> > had it happen on a laptop sometime ago. and it sure messed up my
> > upgrades. I have no idea how it happened, but it has made me
> > paranoid.
> >
>
> The problem is that update-grub rewrites /boot/grub/grub.cfg. It may be
> possible to specify roots and boots in /etc/grub.d/ (I do use a
> separate /boot, but I've never needed to try this) or alternatively it
> is perfectly possible to edit grub.cfg, but you need to remember to do
> so each time update-grub is run, before rebooting. More than once, I've
> known versions of grub not deal correctly with a separate /boot, so
> I've had to do this until the bug was fixed.
>
> Both update-grub and grub-mkconfig (which it calls) are scripts and
> possibly some kind of user warning could be appended to one of them.
>
> Or perhaps if the backup copy were made to a second hard drive (trickier
> with a laptop) then os-prober could be trusted not to mix roots and
> boots between drives.

Excepted of LVM usage separated partitions for /boot IMO don't make
sense. However, isn't there information in /boot, to what / it belongs?
I wonder if the updater at least checks, if the modules in /lib belong
to a kernel of the same version, which wouldn't be a protection, if
different installs should use kernels of the same version. I don't use
the updater, but I suspect that it can be set up to take care about what
belongs to each other. OTOH on my computer the updater seems to take car
about backups of fstabs or what ever, since it will add Linux that are
deleted from my computer a long time ago.
A long time ago I switched back to GRUB legacy and I always edit(ed)
menu.lst und grub.cfg manually.
Would be syslinux better for the OP? I never used syslinux.

Regards,
Ralf


--
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/1347661237.1276.40.camel@localhost.localdomain
 
Old 09-15-2012, 02:14 AM
Hendrik Boom
 
Default Grub2 with multiple Debians

On Fri, 14 Sep 2012 23:06:42 +0200, lee wrote:

> Hendrik Boom <hendrik@topoi.pooq.com> writes:
>
>> It has been my practice when upgrading between Debian releases to make
>> bootable copies of the OS partitions on my hard drive so that if things
>> go badly wrong I still have a bootable system.
>
> How did you make such copies?

Usually by tar piped into untar. Sometimes supplemented by rdiff-copy in
case anything changed during the copy. This makes it easy to change the
file system while I'm at it. Occasionally useful. No, I didn't use dd,
or anything that might co[y the UUID.

>
>> This wprked fine with LILO and GRUB 1, where I was in control of
>> configuratino files and could explicitly specify which root partitions
>> went with which boot partitions/
>>
>> But when installing grub2 to an MBR. all this is automated. It looks
>> around on the available disks and figures out shoch partition goes with
>> which.
>>
>> Of course, after I've made my copy (with slight changes to /etc/fstab)
>> I have two nearly identical sets of partitions, so it may be tricky to
>> tell them apart. Is grub2 clever enough to figure it all out anyway?
>> And what data does it use to this end? (so I can make sure it's right!)
>
> 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 ...)

Presumably while installing grub. WHile booting, grub2 has precious few
decisions to make -- it's pretty well all scripted from the configuration
file.

>
> There needs to be a way for grub to figure out where to look for its
> configuration. Perhaps this information is stored in the MBR when
> installing grub. In that case, you would have a problem when grub
> cannot find its configuration there anymore (like because the
> partitioning has changed) and maybe a problem if it finds the wrong
> configuration.



--
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/k30o9g$5pk$5@ger.gmane.org
 
Old 09-15-2012, 02:19 AM
Hendrik Boom
 
Default Grub2 with multiple Debians

On Fri, 14 Sep 2012 22:37:28 +0100, Joe wrote:

> On Fri, 14 Sep 2012 20:42:21 +0000 (UTC)
> Hendrik Boom <hendrik@topoi.pooq.com> wrote:
>
>> On Fri, 14 Sep 2012 23:25:03 +0300, Andrei POPESCU wrote:
>>
>> > On Vi, 14 sep 12, 17:12:38, Hendrik Boom wrote:
>> >>
>> >> Of course, after I've made my copy (with slight changes to
>> >> /etc/fstab) I have two nearly identical sets of partitions, so it
>> >> may be tricky to tell them apart. Is grub2 clever enough to figure
>> >> it all out anyway? And what data does it use to this end? (so I can
>> >> make sure it's right!)
>> >
>> > UUIDs? What failure mode(s) do you have in mind, because I can't
>> > think of any.
>>
>> It probably is os-prober that I mean. The misconfiguration I have in
>> mind is matching one system's /boot with another systems's /. I've had
>> it happen on a laptop sometime ago. and it sure messed up my upgrades.
>> I have no idea how it happened, but it has made me paranoid.
>>
>>
> The problem is that update-grub rewrites /boot/grub/grub.cfg. It may be
> possible to specify roots and boots in /etc/grub.d/ (I do use a separate
> /boot, but I've never needed to try this) or alternatively it is
> perfectly possible to edit grub.cfg, but you need to remember to do so
> each time update-grub is run, before rebooting. More than once, I've
> known versions of grub not deal correctly with a separate /boot, so I've
> had to do this until the bug was fixed.

It might be that bug that fouled up my laptop. Or I might have done it
myself at some point. Anyway, I've become paranoid about such things.
If the bug has been fixed, well, that'll be one less thing to go wrong
when I upgrade.

Thanks for telling me that there was a bug, and that it was fixed.

>
> Both update-grub and grub-mkconfig (which it calls) are scripts and
> possibly some kind of user warning could be appended to one of them.
>
> Or perhaps if the backup copy were made to a second hard drive (trickier
> with a laptop) then os-prober could be trusted not to mix roots and
> boots between drives.



--
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/k30oiv$5pk$6@ger.gmane.org
 
Old 09-15-2012, 09:06 AM
Ralf Mardorf
 
Default Grub2 with multiple Debians

> >> This wprked fine with LILO and GRUB 1, where I was in control of
> >> configuratino files and could explicitly specify which root partitions
> >> went with which boot partitions/

Why don't you simply get rid of the updater if you need GRUB2? That's
what I did, resp. as I've written before, I currently switched back to
GRUB legacy.

Regards,
Ralf

--
It's not tolerable that the Islam tries to force the free world to
forbid free expression, especially not if people simply tell the truth
or if they make satire that isn't demagogically. Even demagogically
material wouldn't make civilized people killing people and burning
houses.


--
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/1347700009.3520.9.camel@localhost.localdomain
 

Thread Tools




All times are GMT. The time now is 02:30 AM.

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