hekp - root mounted as read-only doesn't allow logins...

hekp - root mounted as read-only doesn't allow logins...

Post by Eric » Fri, 26 Apr 2002 02:26:39



Hi,

I have installed Linux on a read-only partition which is on a Flash device.
The Flash device is not writable as often as a harddisk and therefore
writing must be minimized. All files that must be writable are linked to a
tmpfs which is mounted writable. The problem is that I can't login because
mingetty, agetty or the /bin/login program are trying to change owner and
permissions of /dev/tty0 (for mingetty console login) and /dev/ttyS0 (for
agetty terminal or modem login). Since the /dev directory is read-only this
fails and the error message is:

linux-box login: username
Password: xxxxxx

Unable to change tty /dev/tty1: No such file or directory

Any ideas what I can do to solve this problem?

Thanks!

Eric

 
 
 

hekp - root mounted as read-only doesn't allow logins...

Post by Lee Sau Da » Fri, 26 Apr 2002 16:19:31


    Eric> Hi, I have installed Linux on a read-only partition which is
    Eric> on a Flash device.  

Interesting!

    Eric> The Flash device is not writable as
    Eric> often as a harddisk and therefore writing must be
    Eric> minimized. All files that must be writable are linked to a
    Eric> tmpfs which is mounted writable.

Clever idea!  I've also thought about this for 486-based servers: more
tolerant  to power interrupts  because all  persistent fs  are mounted
r/o.  And no need use journalling (which is not a bad thing, though).

    Eric> The problem is that I can't
    Eric> login because mingetty, agetty or the /bin/login program are
    Eric> trying to change owner and permissions of /dev/tty0 (for
    Eric> mingetty console login) and /dev/ttyS0 (for agetty terminal
    Eric> or modem login). Since the /dev directory is read-only this
    Eric> fails and the error message is:

I'd recommend devfs for /dev.  I've  been using it for a year, and I'm
pretty happy with it.  It isn't a drop-in replacement for a disk based
/dev as  it has a very  novel directory structure.   But is definitely
something  cool.    You'll  need   a  to  tune   /etc/devfsd.conf  and
/etc/modules.devfs  to make  it work  smoothly and  according  to your
tastes, though.  devfs may have been compiled into your kernel.  Check
'dmesg' for hints about it.  (It doesn't hurt to try a "mount -t devfs
none  /mnt"!)    To  enable  it   on  boot,  give  LILO   the  option:
append="devfs=mount".

If devfs is  impossible, then you could consider making  a tar ball of
the  /dev  directory  of that  system,  extract  this  tar ball  in  a
directory  in your  tmpfs, and  then symlink  /dev (after  a  "mv /dev
/dev.backup) to this  directory.  (/dev is just a  directory of inodes
and symlinks.  The entries can  be created anywhere under the VFS.  As
programs will look for them under VFS's /dev, you'll need a symlink.)

The problem  with this approach is  that if you need  to customize the
shutdown scripts to rename /dev.backup  back to /dev on shutdown.  And
if you have a power  interruption, you'll have problems booting up the
system  because /dev  would be  missing.  (Hint:  try to  put  "ln -sf
/dev.backup  /dev"  on the  boot  script,  before  anything else  gets
executed.)  One theoretical alternative  is to have the /dev directory
not stored in  a tarball, but in a file-based  (ext2) fs image.  Then,
you could copy  that fs image to  your tmpfs and then mount  it r/w at
/dev/  using the  loop device.   Unfortunately, loop  can't  work with
files in tmpfs.

--


Home page: http://www.informatik.uni-freiburg.de/~danlee

 
 
 

hekp - root mounted as read-only doesn't allow logins...

Post by Gene Hesket » Sun, 28 Apr 2002 22:56:15



> Hi,

> I have installed Linux on a read-only partition which is on a Flash
device.
> The Flash device is not writable as often as a harddisk and
therefore
> writing must be minimized. All files that must be writable are
linked to a
> tmpfs which is mounted writable. The problem is that I can't login
because
> mingetty, agetty or the /bin/login program are trying to change
owner and
> permissions of /dev/tty0 (for mingetty console login) and
/dev/ttyS0 (for
> agetty terminal or modem login). Since the /dev directory is
read-only this
> fails and the error message is:

> linux-box login: username
> Password: xxxxxx

> Unable to change tty /dev/tty1: No such file or directory

> Any ideas what I can do to solve this problem?

boot as single, remount it read-write, change the perms one time and
reboot?

Quote:> Thanks!

> Eric

--
Cheers, Gene
 
 
 

hekp - root mounted as read-only doesn't allow logins...

Post by Eric » Sun, 28 Apr 2002 23:11:39


Actually, I maanged to solve the problem was solved by using devfs.

Thanks though!

ERic



> > Hi,

> > I have installed Linux on a read-only partition which is on a Flash
> device.
> > The Flash device is not writable as often as a harddisk and
> therefore
> > writing must be minimized. All files that must be writable are
> linked to a
> > tmpfs which is mounted writable. The problem is that I can't login
> because
> > mingetty, agetty or the /bin/login program are trying to change
> owner and
> > permissions of /dev/tty0 (for mingetty console login) and
> /dev/ttyS0 (for
> > agetty terminal or modem login). Since the /dev directory is
> read-only this
> > fails and the error message is:

> > linux-box login: username
> > Password: xxxxxx

> > Unable to change tty /dev/tty1: No such file or directory

> > Any ideas what I can do to solve this problem?

> boot as single, remount it read-write, change the perms one time and
> reboot?

> > Thanks!

> > Eric

> --
> Cheers, Gene

 
 
 

1. I changed root's shell and doesn't login as root

Hi all,

I changed root's shell from csh to ksh in /etc/passwd file, and logout from
root.
I try to login as root but error message is "ksh doesn't exist".
so, i look up the ksh, and the shell's path is incorrect.
now i want to change the root's shell again, but i can not do it, coz i
can't login as root

please help me

thanks in advance

Jaguk Ku

2. XFconfig info needed: MAG DX17F and TVGA 9400CXi

3. Netatalk doesn't allow 'guest' login

4. Read program output

5. Why can't I login when root is mounted in read-write mode?

6. cdrom not responding after upgrade

7. help: can't edit fstab -- rescue mode mounts root fs read-only

8. How to start CDE without dtlogin??

9. kdm doesn't allow root to startx

10. ftp doesn't allow user login; PAM problem?

11. tmpfs doesn't allow nosuid mounts

12. 1.3.3: allow IP works but allow host name doesn't???

13. 'failed running login shell' no non-root user login possible