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 21:31:49 +0000 (UTC)

On Thu, 25 Nov 2004 3aoo-cvfd AT dea.spamcon.org wrote:

sindi keesan wrote:

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,

chroot simply uses the new partition as the root filesystem.
It does not rerun the startup scripts for you.

I have figured out that I can make a single combined script to run all the additional things I added to rc.M and rc.S (a few insmods, and loadkeys script, and something to tell setfont how to map charsets), and I can make a fourth terminal in the same script.


How would I change to the new .profile/profile while still
logged in to the new shell?

profile is a script. You can execute it. If you execute it
with a preceeding . the changes persist.

Wonderful! This was my last obstacle. I will put 'profile' in my script of changes. I have been hunting all over for info on profile and bash.


But when I try this:
cd /etc
profile

Bash: ./profile: Permission denied.

The startup scripts have permission but root does not?

chmod +x profile
profile
(no more complaints)

This did not give me the new aliases. But I got bash to do so - see below.

I also have only three not four terminals (agettys) -
how would I switch those over to the ext2 versions?


My question was how to make four terminals.
/sbin/agetty 38400 tty4 linux
(Do I really need the /sbin in a script if it is on the path?]


By running chroot on each one. This can be automated
(I think) by putting it in /etc/profile.

Once I have mounted to /hd I do not need to repeat that for each terminal, just the chroot /hd part (and the various insmods). Nor do I need to repeat the agetty line. So I will make one script (call it 'ext2'):

#!/bin/sh
/sbin/agetty 38400 tty4 linux [maybe without /sbin]
mount /dev/hdb2 /hd [for BL3 /hdb1]
chroot /hd /bin/bash -login [see below]
insmod ........ (slhc, ppp, mdacon, parport, parport_pc)
/usr/bin/setfont ....... [can I skip the /usr/bin in the script?]
/usr/bin/loadkeys ...... [to make PgUp act like PageUp on my kbd]

The above lines give me the changes between RAMdisk and ext2 versions of BL2 from inittab, rc.M, rc.S. I need to chroot first to run setfont and loadkeys from ext2. Is there any reason to put agetty later in the script?

I can chroot /hd each time I change terminals unless you can tell me exactly how to make this unnecessary.


I have 'dial' in .profile for ppp-on and it won't work

That's because you haven't activated that profile.
I could not do so by typing profile.


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

It isn't. /bin/sh is the default.

So I don't need to specify it. WOuld it be of any advantage to do so, or to specify /bin/bash for BL2?

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

That should work. You might try a parameter after bash
(eg -i or -login). You may be able to get bash to activate
the profile on that partition.

THe man page I looked at said bash --login would activate profile and it did not. I just tried
bash -login - THAT WORKED!!!!!!
I now have lots of aliases.



Please advise on how to reload .profile, profile, and
the *tab files so that I will be truly in the ext2 version

I suggest you make one script containing all the settings
you require for the HD partition and execute that script
immediately after your chroot. Or, if you can find a bash
parameter that activates profile, you might be able to put
everything you need in there.

I made the script. Is there anything else besides the rc's, inittab, profile and .profile that I might need. (Did the bash -login also change .profile?). You know how you modified BL2 to go to hd - what other changes should I be making other than the ones I added?

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

Well, the simplest solution is to use loadlin (or lilo or
grub or whatever) to boot the HD partition directly.
Other than that, chroot can probably be configured to run
automatically (with automatic profile at the other end).

Won't work on this hardware. I will see if I can get it to work with just one script and maybe chroot /hd on the other terminals. This is fun.
Much more so than betting on whether I will get 'not a kernel Image' while booting.

Hal reports on his computer with that problem that it helps to have the kernel image made on the same partition that you are booting to (from?) and you can determine where it was actually made (and then change it) using rdev. I did what he said to diagnose and found that the BL2 (BL3?) kernel was /dev/hdc1. Did you make the kernel on a secondary master partition? I have been booting it from hda2-4 (cannot use hda1 because Win98 DOS won't find it on my DR-DOS formatted drive) and running ext2 linux on hdb1 or hdb2, so this is a mismatch. He offered this fix the day after I moved all the innards to the new computer.


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