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 > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 09-16-2011, 01:49 AM
Dale
 
Default grub and what happens exactly when booting.

OK. The Chief Idiot is going to experiment some. You ALL know what
this means right? Yep, I'm about to really make a mess of things so
here comes some questions. This is a result of the /usr and udev crap.
So, go to -dev and blame them, not me. ;-)


OK. I have three drives in my rig. One is for data files, mounted on
/data ironically, and has nothing to do with the OS. So, for that
reason I'm going to leave it out of this. So, I now have two drives in
my rig that are about to be OS related. sda is a 160Gb and sdb is a
250Gb. I'm going to leave the first one, sda, as is and will use sdb
for testing. Before I start, I want to sort of get my brain wrapped
back around this. It has been a LONG time since I dual booted Linux and
that was only for a month or so. I have grub installed on the MBR of
sda. My boot partition is on sda1 like most likely 99% of the rest of
you and it will stay there even after all this is done. I got /boot
from the old handbook days. When I put my new install on sdb, with this
new initramfs thingy and quite possibly LVM, do I leave grub on sda's
MBR and just point to sdb for the kernel and init thingy and all will be
well?


If this all works out, I will be moving everything from sdb to sda
anyway. My plan is to get them both bootable, then use one to copy to
another after I have learned a bit about this mess. I haven't got that
far yet but wanting to figure this init thingy out before I'm forced to
which will only make it taste even worse.


What I am reading so far:

http://en.gentoo-wiki.com/wiki/Initramfs

I did a google search and found some others boot this is more Gentoo
oriented. So, anything wrong with this as a guide? Pointers to others
if they are better would be great.


Here starts a learning process. It could get bumpy. lol

Dale

:-) :-)
 
Old 09-16-2011, 02:09 AM
Dale
 
Default grub and what happens exactly when booting.

Dale wrote:

<< SNIP >>
What I am reading so far:

http://en.gentoo-wiki.com/wiki/Initramfs

I did a google search and found some others boot this is more Gentoo
oriented. So, anything wrong with this as a guide? Pointers to
others if they are better would be great.


Here starts a learning process. It could get bumpy. lol

Dale

:-) :-)



Oops, typo up there. Should read "I did a google search and found some
others *but* this is more Gentoo oriented." Hey, I got the first and
last right. lol


While I am at this. I just noticed something else. I think this
changed after the openrc upgrade.


root@fireball / # mount
rootfs on / type rootfs (rw)
/dev/root on / type reiserfs (rw,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
rc-svcdir on /lib64/rc/init.d type tmpfs
(rw,nosuid,nodev,noexec,relatime,size=1024k,mode=7 55)

sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
udev on /dev type tmpfs (rw,nosuid,relatime,size=10240k,mode=755)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime)
/dev/sda1 on /boot type ext2 (rw)
/dev/sda8 on /var type ext3 (rw,commit=0)
/dev/sda6 on /usr/portage type ext3 (rw,commit=0)
/dev/sda7 on /home type reiserfs (rw)
/dev/sdc1 on /data type ext4 (rw,commit=0)
usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,devmode=0664,devgid=85)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc
(rw,noexec,nosuid,nodev)

tmpfs on /var/tmp/portage type tmpfs (rw,noatime)
root@fireball / #

Now usually when I boot into a dual OS, I go to a console and type in
mount and make certain of what drive / is mounted too. Example for
this, if mounted to sda* then it is my main OS and if mounted to sdb*
then it is my test install. How does one decipher that up there? Heck,
root could be mounted on anything right now. I'm not going to remove
any partitions right now. I could be running off sdb and not even know
it. o_O


Dale

:-) :-)
 
Old 09-16-2011, 02:55 AM
Pandu Poluan
 
Default grub and what happens exactly when booting.

On Sep 16, 2011 9:11 AM, "Dale" <rdalek1967@gmail.com> wrote:

>

> Dale wrote:

>>

>> << SNIP >>

>>

>> What I am reading so far:

>>

>> http://en.gentoo-wiki.com/wiki/Initramfs

>>

>> I did a google search and found some others boot this is more Gentoo oriented. *So, anything wrong with this as a guide? *Pointers to others if they are better would be great.

>>

>> Here starts a learning process. *It could get bumpy. *lol

>>

>> Dale

>>

>> :-) *:-)

>>

>

> Oops, typo up there. *Should read "I did a google search and found some others *but* this is more Gentoo oriented." *Hey, I got the first and last right. *lol

>

> While I am at this. *I just noticed something else. *I think this changed after the openrc upgrade.

>

> root@fireball / # mount

> rootfs on / type rootfs (rw)

> /dev/root on / type reiserfs (rw,relatime)

> proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)

> rc-svcdir on /lib64/rc/init.d type tmpfs (rw,nosuid,nodev,noexec,relatime,size=1024k,mode=7 55)

> sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)

> debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)

> udev on /dev type tmpfs (rw,nosuid,relatime,size=10240k,mode=755)

> fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)

> devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)

> shm on /dev/shm type tmpfs (rw,nosuid,nodev,noexec,relatime)

> /dev/sda1 on /boot type ext2 (rw)

> /dev/sda8 on /var type ext3 (rw,commit=0)

> /dev/sda6 on /usr/portage type ext3 (rw,commit=0)

> /dev/sda7 on /home type reiserfs (rw)

> /dev/sdc1 on /data type ext4 (rw,commit=0)

> usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,devmode=0664,devgid=85)

> binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)

> tmpfs on /var/tmp/portage type tmpfs (rw,noatime)

> root@fireball / #

>

> Now usually when I boot into a dual OS, I go to a console and type in mount and make certain of what drive / is mounted too. *Example for this, if mounted to sda* then it is my main OS and if mounted to sdb* then it is my test install. *How does one decipher that up there? *Heck, root could be mounted on anything right now. *I'm not going to remove any partitions right now. *I could be running off sdb and not even know it. *o_O


>


Try 'realname /dev/root'. Or realpath, I forgot which exactly.


Heck, just do 'ls -la /dev/root' :-)


It's a symlink to the actual dev


Rgds,
 
Old 09-16-2011, 03:09 AM
Dale
 
Default grub and what happens exactly when booting.

Pandu Poluan wrote:




On Sep 16, 2011 9:11 AM, "Dale" <rdalek1967@gmail.com>
wrote:

>



> Now usually when I boot into a dual OS, I go to a console
and type in mount and make certain of what drive / is mounted
too. *Example for this, if mounted to sda* then it is my main OS
and if mounted to sdb* then it is my test install. *How does one
decipher that up there? *Heck, root could be mounted on anything
right now. *I'm not going to remove any partitions right now. *I
could be running off sdb and not even know it. *o_O

>


Try 'realname /dev/root'. Or realpath, I forgot which exactly.


Heck, just do 'ls -la /dev/root' :-)


It's a symlink to the actual dev


Rgds,






Dead on the mark:



root@fireball / # realpath /dev/root

/dev/sda3

root@fireball / # ls -la /dev/root

lrwxrwxrwx 1 root root 4 Sep* 2 09:11 /dev/root -> sda3

root@fireball / #



Thanks.* It is sda.* Whew !!



Dale



:-)* :-)*
 
Old 09-16-2011, 08:11 AM
Alan McKinnon
 
Default grub and what happens exactly when booting.

On Thu, 15 Sep 2011 20:49:02 -0500
Dale <rdalek1967@gmail.com> wrote:

> OK. The Chief Idiot is going to experiment some. You ALL know what
> this means right? Yep, I'm about to really make a mess of things so
> here comes some questions. This is a result of the /usr and udev
> crap. So, go to -dev and blame them, not me. ;-)

Uh-oh! :-)

>
> OK. I have three drives in my rig. One is for data files, mounted
> on /data ironically, and has nothing to do with the OS. So, for that
> reason I'm going to leave it out of this. So, I now have two drives
> in my rig that are about to be OS related. sda is a 160Gb and sdb is
> a 250Gb. I'm going to leave the first one, sda, as is and will use
> sdb for testing. Before I start, I want to sort of get my brain
> wrapped back around this. It has been a LONG time since I dual
> booted Linux and that was only for a month or so. I have grub
> installed on the MBR of sda. My boot partition is on sda1 like most
> likely 99% of the rest of you and it will stay there even after all
> this is done. I got /boot from the old handbook days. When I put my
> new install on sdb, with this new initramfs thingy and quite possibly
> LVM, do I leave grub on sda's MBR and just point to sdb for the
> kernel and init thingy and all will be well?

The basic idea is you set the boot drive in the bios and which runs grub
from that drive's mbr. When you installed that grub you hard-coded it
to know where to find it's grub.conf.

You can use the existing grub and it's config files just fine. Add a
new entry for your new stuff on sdb - grub will reference that drive as
(hd1) in grub.conf - and configure the root, kernel and initrd
settings appropriately.

If I were you I'd install grub to the mbr on sdb as well. If you happen
to switch sda and sdb around, you'll still have code to boot from on
the new first drive and not need to change the boot drive settings in
the bios. It's not a necessity, just a convenience.



>
> If this all works out, I will be moving everything from sdb to sda
> anyway. My plan is to get them both bootable, then use one to copy
> to another after I have learned a bit about this mess. I haven't got
> that far yet but wanting to figure this init thingy out before I'm
> forced to which will only make it taste even worse.
>
> What I am reading so far:
>
> http://en.gentoo-wiki.com/wiki/Initramfs
>
> I did a google search and found some others boot this is more Gentoo
> oriented. So, anything wrong with this as a guide? Pointers to
> others if they are better would be great.
>
> Here starts a learning process. It could get bumpy. lol
>
> Dale
>
> :-) :-)
>



--
Alan McKinnnon
alan.mckinnon@gmail.com
 
Old 09-16-2011, 10:33 AM
Dale
 
Default grub and what happens exactly when booting.

Alan McKinnon wrote:

The basic idea is you set the boot drive in the bios and which runs grub
from that drive's mbr. When you installed that grub you hard-coded it
to know where to find it's grub.conf.

You can use the existing grub and it's config files just fine. Add a
new entry for your new stuff on sdb - grub will reference that drive as
(hd1) in grub.conf - and configure the root, kernel and initrd
settings appropriately.

If I were you I'd install grub to the mbr on sdb as well. If you happen
to switch sda and sdb around, you'll still have code to boot from on
the new first drive and not need to change the boot drive settings in
the bios. It's not a necessity, just a convenience.




That's what I was thinking. Now that I got that straight in my head.
Moooooving on.


I was wanting to play with reiserfs4. Where in the heck is the
command? I have this:


root@fireball / # mk << tab twice >>
mk_cmds mke2fs mkfs mkfs.ext3
mkfs.msdos mkhybrid mkmanifest mkswap
mkdir mkfifo mkfs.bfs mkfs.ext4
mkfs.reiserfs mk_isdnhwdb mknod mktap
mkdiskimage mkfontdir mkfs.cramfs mkfs.ext4dev
mkfs.vfat mkisofs mkpasswd mktap-2.7
mkdosfs mkfontscale mkfs.ext2 mkfs.minix
mkhomedir_helper mklost+found mkreiserfs mktemp

root@fireball / #

I have reiserfs3 but I can't find 4. I didn't see anything in the man
page either. I thought it may be a option like -j for ext2 or 3.


Thanks.

Dale

:-) :-)
 
Old 09-16-2011, 10:56 AM
Pandu Poluan
 
Default grub and what happens exactly when booting.

On Sep 16, 2011 5:37 PM, "Dale" <rdalek1967@gmail.com> wrote:

>

> Alan McKinnon wrote:

>>

>> The basic idea is you set the boot drive in the bios and which runs grub

>> from that drive's mbr. When you installed that grub you hard-coded it

>> to know where to find it's grub.conf.

>>

>> You can use the existing grub and it's config files just fine. Add a

>> new entry for your new stuff on sdb - grub will reference that drive as

>> (hd1) in grub.conf - and configure the root, kernel and initrd

>> settings appropriately.

>>

>> If I were you I'd install grub to the mbr on sdb as well. If you happen

>> to switch sda and sdb around, you'll still have code to boot from on

>> the new first drive and not need to change the boot drive settings in

>> the bios. It's not a necessity, just a convenience.

>>

>>

>

> That's what I was thinking. *Now that I got that straight in my head. *Moooooving on.

>

> I was wanting to play with reiserfs4. *Where in the heck is the command? *I have this:

>

> root@fireball / # mk << tab twice >>

> mk_cmds * * * * * mke2fs * * * * * *mkfs * * * * * * *mkfs.ext3 * * * * mkfs.msdos * * * *mkhybrid * * * * *mkmanifest * * * *mkswap

> mkdir * * * * * * mkfifo * * * * * *mkfs.bfs * * * * *mkfs.ext4 * * * * mkfs.reiserfs * * mk_isdnhwdb * * * mknod * * * * * * mktap

> mkdiskimage * * * mkfontdir * * * * mkfs.cramfs * * * mkfs.ext4dev * * *mkfs.vfat * * * * mkisofs * * * * * mkpasswd * * * * *mktap-2.7

> mkdosfs * * * * * mkfontscale * * * mkfs.ext2 * * * * mkfs.minix * * * *mkhomedir_helper *mklost+found * * *mkreiserfs * * * *mktemp

> root@fireball / #

>

> I have reiserfs3 but I can't find 4. *I didn't see anything in the man page either. *I thought it may be a option like -j for ext2 or 3.

>


IIRC, you must emerge reiser4.


Try eix reiser


Rgds,
 
Old 09-16-2011, 03:20 PM
Mick
 
Default grub and what happens exactly when booting.

On Friday 16 Sep 2011 11:56:03 Pandu Poluan wrote:
> On Sep 16, 2011 5:37 PM, "Dale" <rdalek1967@gmail.com> wrote:
> > Alan McKinnon wrote:
> >> The basic idea is you set the boot drive in the bios and which runs grub
> >> from that drive's mbr. When you installed that grub you hard-coded it
> >> to know where to find it's grub.conf.
> >>
> >> You can use the existing grub and it's config files just fine. Add a
> >> new entry for your new stuff on sdb - grub will reference that drive as
> >> (hd1) in grub.conf - and configure the root, kernel and initrd
> >> settings appropriately.
> >>
> >> If I were you I'd install grub to the mbr on sdb as well. If you happen
> >> to switch sda and sdb around, you'll still have code to boot from on
> >> the new first drive and not need to change the boot drive settings in
> >> the bios. It's not a necessity, just a convenience.
> >
> > That's what I was thinking. Now that I got that straight in my head.
>
> Moooooving on.
>
> > I was wanting to play with reiserfs4. Where in the heck is the command?
>
> I have this:
> > root@fireball / # mk << tab twice >>
> > mk_cmds mke2fs mkfs mkfs.ext3
>
> mkfs.msdos mkhybrid mkmanifest mkswap
>
> > mkdir mkfifo mkfs.bfs mkfs.ext4
>
> mkfs.reiserfs mk_isdnhwdb mknod mktap
>
> > mkdiskimage mkfontdir mkfs.cramfs mkfs.ext4dev
>
> mkfs.vfat mkisofs mkpasswd mktap-2.7
>
> > mkdosfs mkfontscale mkfs.ext2 mkfs.minix
>
> mkhomedir_helper mklost+found mkreiserfs mktemp
>
> > root@fireball / #
> >
> > I have reiserfs3 but I can't find 4. I didn't see anything in the man
>
> page either. I thought it may be a option like -j for ext2 or 3.
>
>
> IIRC, you must emerge reiser4.
>
> Try eix reiser

You will need to patch your kernel (in your sdb test OS) and then you will
also need to make a reiser4 fs on your sdb partition(s) (for that you'll need
to emerge sys-fs/reiser4progs).

If you want to be able to mount reiser4 from within your sda OS, you will need
of course to patch your current kernel to start with, alternatively use a
LiveCD like sysrescue which comes already patched. For patches look in here:

http://www.kernel.org/pub/linux/kernel/people/edward/reiser4/reiser4-for-2.6/


The way I do what you are trying to do is start with the existing OS on sda,
partition sdb, tar contents of sda partitions into corresponding sdb
partitions and then modify fstab.

Depending on what you want to test you may not need grub installed into sdb's
MBR and you may not need a /boot in sdb. As long as you are not going to
remove sda from the machine you should be able to add a couple of lines in the
original grub.conf to select to boot /dev/sdb, while using sda's MBR and /boot
partition.

HTH.
--
Regards,
Mick
 
Old 09-16-2011, 03:47 PM
Dale
 
Default grub and what happens exactly when booting.

Mick wrote:
You will need to patch your kernel (in your sdb test OS) and then you
will also need to make a reiser4 fs on your sdb partition(s) (for that
you'll need to emerge sys-fs/reiser4progs). If you want to be able to
mount reiser4 from within your sda OS, you will need of course to
patch your current kernel to start with, alternatively use a LiveCD
like sysrescue which comes already patched. For patches look in here:
http://www.kernel.org/pub/linux/kernel/people/edward/reiser4/reiser4-for-2.6/
The way I do what you are trying to do is start with the existing OS
on sda, partition sdb, tar contents of sda partitions into
corresponding sdb partitions and then modify fstab. Depending on what
you want to test you may not need grub installed into sdb's MBR and
you may not need a /boot in sdb. As long as you are not going to
remove sda from the machine you should be able to add a couple of
lines in the original grub.conf to select to boot /dev/sdb, while
using sda's MBR and /boot partition. HTH.


I could have swore reiserfs4 was in the kernel. Sure enough, it ain't.
I'll wait then. I don't want to take the chance that something goes
belly up then not have a bootable way to fix things.


Now to go unmerge the other since I can't use it anyway. lol

Thanks.

Dale

:-) :-)

P. S. I got new glasses today. They have bifocals too. I can actually
read what I type. Here comes that turbo charger again. lol
 
Old 09-16-2011, 04:09 PM
Alan McKinnon
 
Default grub and what happens exactly when booting.

On Fri, 16 Sep 2011 10:47:01 -0500
Dale <rdalek1967@gmail.com> wrote:

> Mick wrote:
> > You will need to patch your kernel (in your sdb test OS) and then
> > you will also need to make a reiser4 fs on your sdb partition(s)
> > (for that you'll need to emerge sys-fs/reiser4progs). If you want
> > to be able to mount reiser4 from within your sda OS, you will need
> > of course to patch your current kernel to start with, alternatively
> > use a LiveCD like sysrescue which comes already patched. For
> > patches look in here:
> > http://www.kernel.org/pub/linux/kernel/people/edward/reiser4/reiser4-for-2.6/
> > The way I do what you are trying to do is start with the existing
> > OS on sda, partition sdb, tar contents of sda partitions into
> > corresponding sdb partitions and then modify fstab. Depending on
> > what you want to test you may not need grub installed into sdb's
> > MBR and you may not need a /boot in sdb. As long as you are not
> > going to remove sda from the machine you should be able to add a
> > couple of lines in the original grub.conf to select to
> > boot /dev/sdb, while using sda's MBR and /boot partition. HTH.
>
> I could have swore reiserfs4 was in the kernel. Sure enough, it
> ain't. I'll wait then. I don't want to take the chance that
> something goes belly up then not have a bootable way to fix things.


reiser4 was never in the kernel and the odds of it ever making it there
were about zero (coding style issues and many other things that pissed
Linux off). And that was in the days when Hans was physically located
in a place where he was allowed to code.

For all practical purposes Reiser4 is dead. I haven't heard a peep out
of anyone claiming to maintain it for a few years now.

--
Alan McKinnnon
alan.mckinnon@gmail.com
 

Thread Tools




All times are GMT. The time now is 08:44 AM.

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