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 02:11:28 +0000 (UTC)

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

sindi keesan wrote:

I can boot BL2 from RAMdisk, or BL3 from loop, or SW40
zipslack, but I cannot boot any version from hard drive.

Once in RAMdisk bl2 I can mount /dev/hdb2 /hd and then
chroot /hd links2, or other programs on hard drive,
I can thus run programs from hard drive but chroot is
a nuisance

It is much less of a nuisance when you do:
------------------
chroot /hd /bin/sh
------------------

What does this do?
I thought chroot /hd command only works once, on each individual command. It did not work well with zgv, which wanted some library.

google/linux man chroot got me a man page online that referred me to part 2 where I found:

chroot /hd (with no command followin)

This puts /hd (the linux ext2 partition) on / and after this I am
using the hd version of linux instead of the RAMdisk version.
Typing ls at / got me an entirely different set of files, and I could run icewm (which I have installed to hd but not the loop BL3). (I need to get the later version with the menu that has links2 in it).


and it would be complicated to compile on such a system.

I've compiled from inside a chroot and it works fine.

I tried to mount /dev/hdb2 /

That won't work. You use chroot for that sort of thing.
I got an error message about / being using already for ram0.

Is there some way to boot with RAMdisk BL2 and then
switch over to the HD by replacing /dev/ram0 with
/dev/hdb2? Same kernel.

Use chroot to run /bin/sh. You can probably automate
it by putting it in a startup script (in baslinux.gz).


How would running /bin/sh work? I don't understand this at all.
Can I then run any command from the ext2 partition without chroot?

Can chroot be somehow set up to work with every command
instead of specifying it before each command?

That's what /bin/sh does. It gives you a CLI which you
can use to run whatever you want.



I will reboot and try this and see what happens, but chroot /hd seems to work. This would also let me, on a more normal computer with RAMdisk or loop BL and an ext2 version, boot into the smaller one and switch over if needed.

with chroot /hd I can no longer use the RAMdisk or loop version, which in my particular case is fine since I was just looking for a way to boot to the hd ext2 partition, but your suggestion is probably more useful if I want to be able to use both versions.

However, if I want to switch back and forth instead of staying in one version and just running an occasional program in the other:

chroot /dev/loop / or /dev/ram0 for BL2

ought to get me back to the loop version or ramdisk version.

Can this be automated in an rc file?

Probably. To do this you will need to edit the image
file for the ramdisk.

I think I will just write a script (named hd?) so that I have the choice of staying in the smaller version or switching to the larger one in a linux partition.

This has been very educational.


Can one reformat a DOS drive from DR-DOS to some other
DOS without losing what is on it?

Doesn't the sys command do that?

Don't know. I think you would also need to change the utilities.
But I won't need to do that since I have chroot working now and this computer is even faster than the other one and I got two PCI sound cards working and an external modem so don't need 4 ISA slots now. I really do NOT want to be using Win98 DOS to boot linux and a boot floppy to then defrag the computer without Windows.

I suppose I could copy all the files to the linux partition,
reformat, and then copy them back.

That's what I do: boot Linux and do a tgz of the entire DOS
partition.

As in copying linux via ethernet (or even plip).


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