Re: read-only root partition?

2002-03-07 Thread Clark C . Evans

On Thu, Feb 28, 2002 at 01:26:49AM -0500, Clark C . Evans wrote:
| | http://people.freebsd.org/~bsd/cdroot/
| 
| Ok.  I've tried this route and it seems to be working,
| thank you all so much for your help and pointers.

Thus far, cdroot has worked well for me.  I have a PleXwriter
23/10/40A and an old Mitsumi 12x CD-ROM (PIO 3).  I get the
following boot messages...

  cd9660: RockRidge extension
  Warning: bytes per inode restricts cylinders per group to 9.
  Warning: inode blocks/cyl group (285) = data blocks (256) in last
cylinder group.  This implies 4096 sector(s) cannot be allocated.
  496 blocks
  Warning: block size restricts cylinders per group to 26.
  496 blocks

After that, all seems to go well.  Unfortunately, when this same 
CD-ROM is placed into a newer CD-ROM reader it either doesn't boot
at all... (such as the Data Research 56x max or Vintech Intl. VIN-44A)
or it gives me the following result: (results vary)

   pid 7 (sh) uid 0: exited on signal 5/10/11

Where it can't seem to make up it's mind about what signal it
exits with 5, 10, or most frequently, 11.

I've tried everything... and purched 2 additional new
CD-ROM units with the same result... the new CD-ROMs don't
like the file that's being generated.

Thoughts?

Clark




I've had some problems getting cdroot to work
| 
| I also see a few drives complaining (like the mouse), 
| I think I know how to re-do the kernel to leave out
| the mouse driver though.  Is this a cd driver that
| needs to be removed?
| 
| Anyway, I log-in and everything works nicely.  Cool.
| Given that I've gotten this far with cdroot, I think
| I'm going to stick with this solution... and figure
| out how it works.   This kit makes three mfs for me: 
| tmp, var, etc, dev.   I'm wondering if the etc 
| and dev must be done as mfs?
| 
| My next step is to make a custom boot process:
| 
|  1. Check to see if /dev/ad0s1b exists and is a
| swap partition, if so, load it.
| 
|  2. Check to see if /dev/ad0s1? exists and is
| a FreeBSD partition.  If so, see if it looks
| like a /tmp, /var, or /home partition.  If
| so mount as appropriate.
| 
|  3. Modify (2) above, to search on /ad?s1? for
| a similar structure.  If so, then mount it
| using vinum.
| 
| If steps 1-3 above fail, then assume it is an
| uninitialized box.  Ask the user to verify
| this fact, and then create the partitions 
| automagically.   If there are two disks, ask
| the user if a software mirror is to be used,
| if so, then configure this as well.
| 
| If any of you have any suggestions/comments/ideas
| as to how to best do this, I'd love to hear them!
| 
| Best,
| 
| Clark
| 
| 
| 
| 
| 
| 
| 
| 
| 
| 
| Thank you all so much for your
| suggestions and thoughts!  
| 
| My next step is to examine the file system:
| 
|   (a) if the data partition exists, then this
|   can be mounted and /var and /tmp can be
| 
|   
| 
| 
| 
| 
| To Unsubscribe: send mail to [EMAIL PROTECTED]
| with unsubscribe freebsd-hackers in the body of the message

-- 
Clark C. Evans   Axista, Inc.
http://www.axista.com800.926.5525
XCOLLA Collaborative Project Management Software

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message



Re: read-only root partition?

2002-02-28 Thread Brian Dean

On Thu, Feb 28, 2002 at 01:26:49AM -0500, Clark C . Evans wrote:
 
 | http://people.freebsd.org/~bsd/cdroot/
 
 Ok.  I've tried this route and it seems to be working,
 thank you all so much for your help and pointers.

Whoops, sorry.  I just replied to your earlier mail mentioning these
scripts, but I see now that you've already found them.  I really
should read everything through before responding.

 During burning the iso image, I get a message to my 
 console,  PREVENT_ALLOW - ILLEGAL REQUEST asc=64 ascq=0 error=04
 this occurs as burncd is fixing.

I've never seen that before so I don't know.

   acd0: CD-RW ...
   Mouning from root iso9660:cd0a
   no such device 'cd'
   setrootbyname failed
   iso_mountroot: can't find rootvp
   Root mount failed: 6
   Mounting root from iso9660:acd0

This is harmless ... the startup code is doing a boot -C which
instructions the kernel to mountroot from the CD drive.  It first
tries the scsi drive (cd0a), but not being there it failed, but then
moves on to the IDE cd drive (acd0) and succeeds.

 I also see a few drives complaining (like the mouse), 
 I think I know how to re-do the kernel to leave out
 the mouse driver though.  Is this a cd driver that
 needs to be removed?

I'm not sure what you mean by this question.  If your asking if the CD
should be removed, the answer is no.  In fact, you won't be able to
eject the CD while the system is running because it is mounted at the
root, and its not possible to unmount /.  To eject and switch to a new
cd, do a 'halt', wait until you get the message that says you can
press any key to reboot, then eject.

 Anyway, I log-in and everything works nicely.  Cool.
 Given that I've gotten this far with cdroot, I think
 I'm going to stick with this solution... and figure
 out how it works.   This kit makes three mfs for me: 
 tmp, var, etc, dev.   I'm wondering if the etc 
 and dev must be done as mfs?

I guess technically, /etc does not.  However, one feature of this
method (as I described in my earlier mail that I sent not knowing
you'd gotten this far) is that you can provide override files from a
floppy disk.  You wouldn't be able to do this if its not rw.

/dev needs to be rw.

 My next step is to make a custom boot process:
 
  1. Check to see if /dev/ad0s1b exists and is a
 swap partition, if so, load it.
 
  2. Check to see if /dev/ad0s1? exists and is
 a FreeBSD partition.  If so, see if it looks
 like a /tmp, /var, or /home partition.  If
 so mount as appropriate.
 
  3. Modify (2) above, to search on /ad?s1? for
 a similar structure.  If so, then mount it
 using vinum.
 
 If steps 1-3 above fail, then assume it is an
 uninitialized box.  Ask the user to verify
 this fact, and then create the partitions 
 automagically.   If there are two disks, ask
 the user if a software mirror is to be used,
 if so, then configure this as well.

All of these are doable and could reasonably go into the file that I
used to replace /etc/rc (rc.replacement, which gets installed as
/etc/rc on the CD).  Take a look at rc_hook variable in rc.replacement
(set this in /etc/rc.conf on the CD or on the floppy /etc/rc.conf).
This may be a good way to hook in your customizations.

As far as how to do what you want regarding the local disk, you could
simply run disklabel -r on ad0s1 and look at what partitions are
there.  In the CD based root, you have a full /usr/bin worth of tools
to work with very early on in the boot process.  #1 should be pretty
simple, just grep for it and if it is there issue a swapon.

For #2, you could mount each one in turn on /mnt, and do a spot check
for some identifying files or directories that would likely be in
/usr, or /var, or whatever.  Once you find a match, then unmount it
from /mnt and remount it where it should go.

I don't use vinum, so I'm not sure about #3, but that should probably
be similar.

These are just a few suggestions.  I'm sure there are many ways to
implement what you are wanting.

Good luck!

-Brian
-- 
Brian Dean
[EMAIL PROTECTED]
[EMAIL PROTECTED]

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message



Re: read-only root partition?

2002-02-27 Thread Clark C . Evans

| http://people.freebsd.org/~bsd/cdroot/

Ok.  I've tried this route and it seems to be working,
thank you all so much for your help and pointers.

During burning the iso image, I get a message to my 
console,  PREVENT_ALLOW - ILLEGAL REQUEST asc=64 ascq=0 error=04
this occurs as burncd is fixing.   However, I did
reboot and it seems to work.  I don't know how to get
a trace-file of the bootup... but here are some things
that I am a wee bit concerned about.  I seemed to have
one error that popped up that I don't know how to resolve,
here is it re-typed...

  acd0: CD-RW ...
  Mouning from root iso9660:cd0a
  no such device 'cd'
  setrootbyname failed
  iso_mountroot: can't find rootvp
  Root mount failed: 6
  Mounting root from iso9660:acd0

I also see a few drives complaining (like the mouse), 
I think I know how to re-do the kernel to leave out
the mouse driver though.  Is this a cd driver that
needs to be removed?

Anyway, I log-in and everything works nicely.  Cool.
Given that I've gotten this far with cdroot, I think
I'm going to stick with this solution... and figure
out how it works.   This kit makes three mfs for me: 
tmp, var, etc, dev.   I'm wondering if the etc 
and dev must be done as mfs?

My next step is to make a custom boot process:

 1. Check to see if /dev/ad0s1b exists and is a
swap partition, if so, load it.

 2. Check to see if /dev/ad0s1? exists and is
a FreeBSD partition.  If so, see if it looks
like a /tmp, /var, or /home partition.  If
so mount as appropriate.

 3. Modify (2) above, to search on /ad?s1? for
a similar structure.  If so, then mount it
using vinum.

If steps 1-3 above fail, then assume it is an
uninitialized box.  Ask the user to verify
this fact, and then create the partitions 
automagically.   If there are two disks, ask
the user if a software mirror is to be used,
if so, then configure this as well.

If any of you have any suggestions/comments/ideas
as to how to best do this, I'd love to hear them!

Best,

Clark










Thank you all so much for your
suggestions and thoughts!  

My next step is to examine the file system:

  (a) if the data partition exists, then this
  can be mounted and /var and /tmp can be

  




To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message



Re: read-only root partition?

2002-02-27 Thread Clark C . Evans

Ok.  I have a slight problem, I swapped by CD Writer (HP 8100)
with a CD-Reader (Mitsumi) and rebooted.  I get a new
error during the boot process... immediatly following:

|   acd0: CD-RW ...
|   Mouning from root iso9660:cd0a
|   no such device 'cd'
|   setrootbyname failed
|   iso_mountroot: can't find rootvp
|   Root mount failed: 6
|   Mounting root from iso9660:acd0

acd0: READ_BIG - MEDIUM ERROR asc=02 ascq=0 error=00
Root mount failed: 5
no such device 'wcd'
set rootbyname failed
cd9960: Rockridge Extension
acd0: READ_BIG - command timeout - resetting
bus error
...
 bunch more READ_BIG MEDIUM ERRORs and timeouts
 then a vm fault pager read error, then a 
 bus error core dumped... then it ends saying
 that it can't mount fstab so startup is aborted.

...

Does this have anything to do with the following error?

| During burning the iso image, I get a message to my 
| console,  PREVENT_ALLOW - ILLEGAL REQUEST asc=64 ascq=0 error=04
| this occurs as burncd is fixing.  

I replaced the reader with the writer and all is well, so,
I see a few potentials for this problem:

  (a) bad media
  (b) bad writer
  (c) bad reader
  (d) imperfect software
  (e) some combination

It's about time I replaced by CD-Writer and got a new CD-Reader,
any brands that you recommend?  I can get new media while I'm at it.

By the way, another group of warnings appear in both boot cases...

  Warning: Bytes per inode restrict cylinders per group to 9
  Warning: Inode blocks/cylinder group (285) = data blocks (256)
   in the last cylinder group, this implies that 4096 
   cylinders cannot be allocated
  496 blocks
  Warning: Block size restricts cylinders per group to 26
  496 blocks
  mounting non-volitle disk

Is this something to be worried about?

Thank you all so much.

Best,

Clark

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-hackers in the body of the message