Skip to Content.
Sympa Menu

baslinux - Re: Switching from RAMdisk or loop to HD BL after booting, was Re: [BL] Cannot boot BL2 HD but RAMdisk works.

baslinux AT lists.ibiblio.org

Subject: Baslinux mailing list

List archive

Chronological Thread  
  • From: sindi keesan <keesan AT sdf.lonestar.org>
  • To: baslinux AT lists.ibiblio.org
  • Subject: Re: Switching from RAMdisk or loop to HD BL after booting, was Re: [BL] Cannot boot BL2 HD but RAMdisk works.
  • Date: Wed, 24 Nov 2004 20:27:18 +0000 (UTC)

On Wed, 24 Nov 2004 3aoo-cvfd AT dea.spamcon.org wrote:

sindi keesan wrote:

chroot /hd (with no command followin)

That defaults to /bin/sh
I included /bin/sh in my suggestion because I wasn't
sure the busybox chroot would do the default.

How would running /bin/sh work?

Try the following:
-------
/bin/sh
-------
It gives you a sub-shell (which works just like your
ordinary shell).

I don't understand this at all.

"chroot /hd /bin/sh" runs a subshell (sh) on the filesystem
it finds on /hd (assuming /hd/bin/sh exists). The /bin in
the chroot command is relative to the new filesystem.

I am trying this now. Booted into BL2 ramdisk, mount and chroot to the ext2 partition, and I discovered that I also need to run rc.S and rc.M where I made changes to keyboard and monitor, and that I am still using the old .profile and profile, which would include the PATH. I cannot simply copy them over to the RAMdisk version because they refer to binaries not in the RAMdisk version (mdacon.o I could copy, but not the keyboard stuff). How would I change to the new .profile/profile while still logged in to the new shell? My .profile is just aliases. Maybe I can copy that to RAMdisk bl2.

I also have only three not four terminals (agettys) - that is set up in mtab or fstab or inittab - how would I switch those over to the ext2 versions?

I have the same problem using your method. I have 'dial' in .profile for ppp-on and it won't work, 'command not found'.

And I have switched over only one terminal at a time rather than all of them, but I can learn to deal with this, I guess. I have lots of RAM to waste as this new board has 256MB.

How is chroot /hd different from chroot /hd /bin/sh ?


Can I then run any command from the ext2 partition without chroot?

Yes. You are in the subshell until you type exit.

chroot /hd seems to work.

As long as your version of chroot defaults to /bin/sh
(or whatever shell you have in /hd/bin) it will work.

I have bash, I think, in BL2. SHould I try chroot /hd /bin/bash?


with chroot /hd I can no longer use the RAMdisk or
loop version,

Your original filesystem should still be running on
your other ttys.
Yes, it is.


chroot /dev/loop / or /dev/ram0 for BL2
ought to get me back to the loop version or ramdisk version.

Exit gets you back.
Yes it did.

Please advise on how to reload .profile, profile, and the *tab files so that I will be truly in the ext2 version rather than a mixture.
I can handle the rc.S and rc.M part after chroot /hd [/bin/[ba]sh].

I think there was something about qinit (?) (which we do not have) mentioned as a way to put mdacon.o in rc.M and then not have to reboot to get it to run rc.M. I will go read about it online.

If necessary I can copy .profile and profile and rc.M and rc.S (in BL2) or rc (BL3) to the RAMdisk/loop versions, and set up four terminals.
Is this likely to cause any problems for the RAMdisk version?

(Somewhere I have notes on how to rebuild initrd.gz for BL2).

Is there something simple I could try instead to get this computer to boot directly to the HD BLs?


Cheers,
Steven

____________________________
http://www.basiclinux.com.ru
_______________________________________________
BasLinux mailing list
BasLinux AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/baslinux


keesan AT sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org




Archive powered by MHonArc 2.6.24.

Top of Page