Unix Technical Forum

Re: BOOT-CD Problem

This is a discussion on Re: BOOT-CD Problem within the comp.unix.bsd.openbsd.misc forums, part of the OpenBSD category; --> *** post for FREE via your newsreader at post.newsfeed.com *** Sami Kujala schrieb: > > First, some questions: What, ...


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > comp.unix.bsd.openbsd.misc

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-16-2008, 04:16 AM
Ewald Peters
 
Posts: n/a
Default Re: BOOT-CD Problem

*** post for FREE via your newsreader at post.newsfeed.com ***

Sami Kujala schrieb:
>
> First, some questions: What, if I may ask, are you planning to
> use the LiveCD computer for? Do you really need X11 running on
> it? Could tell me a bit more of the computer you plan to run OBSD


i don't know right now, but if it works i had the idea
of burning cds for a printer server, a internet-surving-only-workstation
with X,
a firewall, a webcam-server - whatever and everything without the need
of a harddisk
everything OBSD 3.2 on a intel 486 or Pentium 166 or Pentium II with
cd-boot-capability of course.
with 16, 32, 128 MB Ram

> on (architecture and such)? And last, what have you done so far
> meaning, where does the boot process/startx stop?


i'm fighting hard against these 3 errors that appear after the
kernel(image)
booted:

1.) NO LOGIN: if i compile into the kernel the following i get the
virtual terminals,
which a had not before, but i don't get a login at any of them!!
if i don't compile these kernel options in, i only get one console, but
with login. These are the 'evel' kernel options:

option WSDISPLAY_COMPAT_USL # VT handling
option WSDISPLAY_COMPAT_RAWKBD # can get raw scancodes
option WSDISPLAY_DEFAULTSCREENS=6
option WSDISPLAY_COMPAT_PCVT # emulate some ioctls

i know that these are from GENERIC and should therefore work.
if i only let WSDISPLAY_DEFAULTSCREENS=6 it's the same, so it seems,
that this is the 'most evel' option.
I think it can interfere with ttyC4 somehow which is nessesary for the X
screen,
but all devices seem to be there as on the original mashine, where X
runs properly.

2.) NO PRINTER: during /etc/rc is executed, inbetween there comes the
error

starting network daemons: printerlpd: printer/tcp: unknown service

I even tried to overcome this error by changing 'services' in the
miniroot
filesystem (/usr/src/sys/miniroot/) but it didn't help.
the computer from which the cd is made from works fine as a printer
server
(/etc/services does contain port 515)

3.) NO XFREE86: when i have at last a login (and no other virtual
terminals)
and i type startx it comes up with:

SocketUNIXCreateListener: mkdir(/tmp/.X11-unix) failed, errno = 13
_XSERVTran_Max_AllCOTSServerListeners: failed to create listener for
local

Fatal server error:
failed to create all listening Sockets

giving up
xinit: No such file or directory (errno 2): unable to connect to X
server
xinit: No such process (errno 3): Server error

errno 13 is 'Permission denied' errno 2 and 3 is, what it says
but when i look into /tmp i can see the directory .X11-unix
and the permissions of /tmp are 777

> With my approach at boot time I still have read-only mounted
> /etc, /dev, /home, /tmp and /var but when /etc/rc reads
> /etc/fstab and mounts all the mfs filesystems, my /etc, /var,
> /tmp, and /home become empty as new file system is mounted on
> _those_mountpoints_. This is corrected by untarring the
> /cdboot/mfs.tgz. Did this clarify the idea any better?


ok i got this right now, but what about /usr and /root which is
nessessary
for X because the binaries and config files and the 'X-link' is in
/usr/X11R6
and in /root there is .Xauthority.

So i currently implemented a mixture of the two approaches discussed
earlier:

first i mount fstab like you (is 'swap /tmp mfs
rw,nodev,noexec,nosuid,noatime,-s=262144 0 0'
really right? X needs this dir to create several files ...)
secondly i mount_union the rest of the CD in /tmp like
http://www.blackant.net/other/docs/h...om-openbsd.php

i think this works now (only the mounting)

> Your packages and other programs live in /usr (right?) which is
> mounted read-only from the cd.


When i start X with startx it complains about that. if i didn't mount it
rw,
it tells me the X-link has the wrong permissions, which a overcame with
a line in rc to recreate it after mount_union-ing /usr

cd /usr/X11R6/bin; rm X; ln -s XFree86 X

> In mfs.tgz is only the data which possibly can change during
> runtime.


so you think /root and /bin /sbin /usr can stay read only?
is this really the case? what does 'mount' say on your system?

> > So you just untared the files which where compressed on the
> > other computer, but in this file structure there is still
> > /cdrom/mfs.tgz, right?

>
> Hmm, I am not sure if I understood your question, but I guess
> yes, I just moved the whole file structure from drive (B) into a
> computer with cd burner (but alas, no OpenBSD). Had it had
> OpenBSD I would have done everything in it.


ok, now i know that there is a miniroot filesystem included into
the kernel image which is not only the kernel itself
inside this miniroot filesystem there are such important things like
/sbin/init
and this init seem to mount / as it is discribed in the kernel option
file,
independently of /etc/fstab.
As soon / is there it reads /etc/rc devices from /dev aso.
So the process to build the filesystem for the live-CD can be
either mount_mfs mount_union or whatever as long it works.
But this is the dificult thing: to make the applications believe, that
they live on the harddisk, where they have been before.

ciao

Ewald


-----= Posted via Newsfeed.Com, Uncensored Usenet News =-----
http://www.newsfeed.com - The #1 Newsgroup Service in the World!
-----== 100,000 Groups! - 19 Servers! - Unlimited Download! =-----

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-16-2008, 04:17 AM
Sami Kujala
 
Posts: n/a
Default Re: BOOT-CD Problem

Ewald Peters wrote:

> i don't know right now, but if it works i had the idea of
> burning cds for a printer server, a
> internet-surving-only-workstation with X, a firewall, a
> webcam-server - whatever and everything without the need of a
> harddisk everything OBSD 3.2 on a intel 486 or Pentium 166 or

^^^^^^^^

Hmm, I implicitly assumed you were using OBSD 3.3, the source of
your problems _might_ be just that. What if you tried doing your
livecd system with 3.3 instead of 3.2?

Do you have a spare HD which you could plug into the computer you
will use with the livecd? If so, you could install fresh OBSD on
that HD, configure it, add packages etc. and THEN you would make
the modifications to /etc/rc, /etc/fstab et.al. After this you
would burn the cd from the HD and remove the HD from the
computer. This might be the easiest way to be sure that your
problems are not related to the OBSD being misconfigured but
truly related to booting from cd.

> cd-boot-capability of course. with 16, 32, 128 MB Ram


I would recommend as much RAM as possible and pushing the kernel
option BUFCACHEPERCENT to as big as possible so you would the get
the biggest benefit of cache as cdrom access is slooooow... But
this you already knew, I guess.

> ok i got this right now, but what about /usr and /root which is
> nessessary for X because the binaries and config files and the
> 'X-link' is in /usr/X11R6 and in /root there is .Xauthority.


What do you need /root for? You are not logging into the computer
as root, are you? Big Boys Say that you should avoid logging in
as root but use instead sudo and su from a normal, unpriviledged,
user account. See manual pages for sudo and su.

> first i mount fstab like you (is 'swap /tmp mfs
> rw,nodev,noexec,nosuid,noatime,-s=262144 0 0' really right? X
> needs this dir to create several files ...)


Is there something wrong with it? /tmp is mounted on a memory
filesystem which is read-write so e.g. X can write into it.

> secondly i mount_union the rest of the CD in /tmp like
> http://www.blackant.net/other/docs/h...om-openbsd.php
>
> i think this works now (only the mounting)


I tried that but I had some weird problems, like mysterious
extra directories suddenly appearing in /usr.

> so you think /root and /bin /sbin /usr can stay read only? is
> this really the case? what does 'mount' say on your system?


In my opinion, yes with the possible exception of /root. Honestly
speaking I forgot all about that directory , but so far my
system works quite fine with /root mounted read-only.

output of mount:

/dev/cd0a on / type cd9660 (local, noatime, read-only)
mfs:27877 on /dev type mfs (asynchronous, local, noatime, \
union, size=12000 512-blocks)
mfs:14294 on /tmp type mfs (asynchronous, local, noatime, \
nodev, noexec, nosuid, size=262144 512-blocks)
mfs:26743 on /var type mfs (asynchronous, local, noatime, \
size=262144 512-blocks)
mfs:16007 on /etc type mfs (asynchronous, local, noatime, \
size=131072 512-blocks)
mfs:1247 on /home type mfs (asynchronous, local, noatime, \
size=262144 512-blocks)

[long lines wrapped to fit into screen]

> ok, now i know that there is a miniroot filesystem included
> into the kernel image which is not only the kernel itself
> inside this miniroot filesystem there are such important things
> like /sbin/init and this init seem to mount / as it is
> discribed in the kernel option file, independently of
> /etc/fstab. As soon / is there it reads /etc/rc devices from
> /dev aso.


Correct, this is the way I've have understood the boot process to
go.

> So the process to build the filesystem for the live-CD can be
> either mount_mfs mount_union or whatever as long it works. But
> this is the dificult thing: to make the applications believe,
> that they live on the harddisk, where they have been before.


Why should well-behaving *nix applications care if they are on a
cd or a hd? They see the same file structure as previously, only
now parts of it is on a read-only partition. With Windoze your
problem is true, at least to some extent.


Have fun with your hd-less workstations and do let us know of
your experiences when/if you succeed with your attempts.


Have a nice day now,

sami
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:05 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com