FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 04-19-2008, 07:18 PM
Gyuszk
 
Default init 1, root device is busy :(

Hello Gentoo users,

I just can't fsck my root device because my Gentoo system don't allow me
to remount it as readonly (mount -o ro,remount /dev/hda1). A rw-mounted
device is unsafe to be fsck -ed. (AFAIK).


When I go to tty1, login as root, do these:

killall kdm, then init 1. It goes to runlevel 1 (maintenance level). But
I don't have to type my root password in the end (on other distros I had
to). I can unmount my /boot and /home partitions but I just can't
remount my root device to be readonly. (Linux says it is busy.) What
should I do with this?


1.) Should I edit my Grub menu.lst to make a new entry with "single ro"
kernel parameteres?
2.) Of course I can fsck from (for example) a LiveCD (like Gentoo
minimal cd), but at the present I don't have any of these.

3.) Other solution?

Thanks in advance!

pm.: I just love my Gentoo system
--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-19-2008, 07:30 PM
Michal 'vorner' Vaner
 
Default init 1, root device is busy :(

Hello

On Sat, Apr 19, 2008 at 09:18:04PM +0200, Gyuszk wrote:
> 3.) Other solution?

man shutdown:

-F Force fsck on reboot.

(I know, this one is not really intuitive)

--
Work with computer has 2 phases. First, computer waits for the user to tell it what
to do, then the user waits for the computer to do it. Therefore, computer work
consists mostly of waiting.

Michal 'vorner' Vaner
 
Old 04-19-2008, 07:34 PM
Francesco Talamona
 
Default init 1, root device is busy :(

On Saturday 19 April 2008, Gyuszk wrote:
> I can unmount my /boot and /home partitions but I just can't
> remount my root device to be readonly. (Linux says it is busy.) What
> should I do with this?
>
> 1.) Should I edit my Grub menu.lst to make a new entry with "single
> ro" kernel parameteres?
> 2.) Of course I can fsck from (for example) a LiveCD (like Gentoo
> minimal cd), but at the present I don't have any of these.
> 3.) Other solution?

Of course: it's in use :-)

Two options:

1) force partition check with the following command (seen recently in
this list)
shutdown -Fr

2) create the file /forcefsck
touch /forcefsck
then reboot, during shutdown you'll see "A full fsck will be forced on
next startup" and then "Checking root filesystem (full fsck forced)"

See the scripts /etc/init.d/halt.sh, /etc/init.d/checkfs
and /etc/init.d/checkroot to see all the "nuts and bolts"

Ciao
Francesco

--
Linux Version 2.6.24-gentoo-r4, Compiled #2 PREEMPT Wed Apr 2 08:07:24
CEST 2008
One 1GHz AMD Athlon 64 Processor, 2GB RAM, 2004.03 Bogomips Total
aemaeth
--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-19-2008, 07:53 PM
Abraham Gyorgy
 
Default init 1, root device is busy :(

Francesco Talamona wrote:

On Saturday 19 April 2008, Gyuszk wrote:


I can unmount my /boot and /home partitions but I just can't
remount my root device to be readonly. (Linux says it is busy.) What
should I do with this?

1.) Should I edit my Grub menu.lst to make a new entry with "single
ro" kernel parameteres?
2.) Of course I can fsck from (for example) a LiveCD (like Gentoo
minimal cd), but at the present I don't have any of these.
3.) Other solution?



Of course: it's in use :-)

Two options:

1) force partition check with the following command (seen recently in
this list)

shutdown -Fr

2) create the file /forcefsck
touch /forcefsck
then reboot, during shutdown you'll see "A full fsck will be forced on
next startup" and then "Checking root filesystem (full fsck forced)"


See the scripts /etc/init.d/halt.sh, /etc/init.d/checkfs
and /etc/init.d/checkroot to see all the "nuts and bolts"


Ciao
Francesco



Thanks a lot! I'll give a deep look at the mentioned files.
Anyway I think I'll set my fstab. Now all my partitions are set to
"never fsck" at boot time.

--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-19-2008, 07:53 PM
Abraham Gyorgy
 
Default init 1, root device is busy :(

Michal 'vorner' Vaner wrote:

Hello

On Sat, Apr 19, 2008 at 09:18:04PM +0200, Gyuszk wrote:


3.) Other solution?



man shutdown:

-F Force fsck on reboot.

(I know, this one is not really intuitive)



Thanks!
--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-19-2008, 08:31 PM
Francesco Talamona
 
Default init 1, root device is busy :(

On Saturday 19 April 2008, Abraham Gyorgy wrote:
> Thanks a lot! I'll give a deep look at the mentioned files.
> Anyway I think I'll set my fstab. Now all my partitions are set to
> "never fsck" at boot time.

Supposing it's a ext2/3 partition you may also want to use tune2fs to
set the check *frequency*.

Other filesystems have specialized tools to do it.

Ciao
Francesco

--
Linux Version 2.6.24-gentoo-r4, Compiled #2 PREEMPT Wed Apr 2 08:07:24
CEST 2008
One 1GHz AMD Athlon 64 Processor, 2GB RAM, 2004.03 Bogomips Total
aemaeth
--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-19-2008, 10:03 PM
Abraham Gyorgy
 
Default init 1, root device is busy :(

Francesco Talamona wrote:

On Saturday 19 April 2008, Abraham Gyorgy wrote:


Thanks a lot! I'll give a deep look at the mentioned files.
Anyway I think I'll set my fstab. Now all my partitions are set to
"never fsck" at boot time.



Supposing it's a ext2/3 partition you may also want to use tune2fs to
set the check *frequency*.


Other filesystems have specialized tools to do it.

Ciao
Francesco


Yes, I know that (read in the manpage). Once I did mess up totally my
filesystem (I think I typed wrong arguments accidentally) with tune2fs.

Since then I really fear of that command.

Okay, so after setting a correct fstab (and the shutdown -Fr now) _all_
my partitions were checked during boot (no more need to worry about the
init 1 thing.). My root partition were fixed (reboot was needed). I'll
set an fsck frequency and set counters to zero. Thanks all the help,
people on this mailing list are very-very helpful. Thanks everyone who
wrote to this thread!


--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-20-2008, 07:34 AM
"Dirk Heinrichs"
 
Default init 1, root device is busy :(

Am Samstag, den 19.04.2008, 21:53 +0200 schrieb Abraham Gyorgy:
> Now all my partitions are set to
> "never fsck" at boot time.

Never do this unless you're using xfs.

Bye...

Dirk
 
Old 04-20-2008, 01:56 PM
Abraham Gyorgy
 
Default init 1, root device is busy :(

Dirk Heinrichs wrote:

Am Samstag, den 19.04.2008, 21:53 +0200 schrieb Abraham Gyorgy:

Now all my partitions are set to
"never fsck" at boot time.



Never do this unless you're using xfs.

Bye...

Dirk


Why? "never fsck at boot time" ->

/dev/hda1 /boot ext3 noauto,noatime 0 0
/dev/hda2 / ext3 noatime 0 0
/dev/hda3 /home ext3 noatime 0 0


Now it is set to:

/dev/hda1 /boot ext3 noauto,noatime 0 2
/dev/hda2 / ext3 noatime 0 1
/dev/hda3 /home ext3 noatime 0 2

(I've read in fstab manpage that root device should be 1, other
partition should be 2.

--
gentoo-user@lists.gentoo.org mailing list
 
Old 04-20-2008, 05:00 PM
"Dirk Heinrichs"
 
Default init 1, root device is busy :(

Am Sonntag, den 20.04.2008, 15:56 +0200 schrieb Abraham Gyorgy:
> Dirk Heinrichs wrote:
> > Am Samstag, den 19.04.2008, 21:53 +0200 schrieb Abraham Gyorgy:
> >
> >> Now all my partitions are set to
> >> "never fsck" at boot time.
> >>
> >
> > Never do this unless you're using xfs.
>
> Why? "never fsck at boot time" ->

Because bad things can happen if you don't fsck at boot time. The only
exception to this is xfs, which you are not using, as I see below.

> /dev/hda1 /boot ext3 noauto,noatime 0 0
> /dev/hda2 / ext3 noatime 0 0
> /dev/hda3 /home ext3 noatime 0 0
>
> Now it is set to:
>
> /dev/hda1 /boot ext3 noauto,noatime 0 2
> /dev/hda2 / ext3 noatime 0 1
> /dev/hda3 /home ext3 noatime 0 2

That looks better.

Bye...

Dirk
 

Thread Tools




All times are GMT. The time now is 06:53 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org