* [gentoo-user] how can I disable renaming of root fs to "/dev/root"?
@ 2011-11-11 17:37 Jarry
2011-11-12 2:52 ` [gentoo-user] " Nikos Chantziaras
2011-11-12 11:43 ` [gentoo-user] " victor romanchuk
0 siblings, 2 replies; 5+ messages in thread
From: Jarry @ 2011-11-11 17:37 UTC (permalink / raw
To: gentoo-user
Hi,
this is actually not problem but rather a matter of customs:
My new fresh installed system shows root-fs in "df" as
/dev/root, not actuall device (in my case /dev/md2).
I think I coud get used to it, but some software still needs
/dev/md2 (i.e. lilo), other does not find /dev/md2 anymore
and needs /dev/root to work properly (i.e. monit).
Moreover, in /etc/fstab I still have to use /dev/md2 as root
filesystem, while /etc/mtab shows only /dev/root.
I do not like such a mess and I'd like to put it in rather
consistent state where root filesystem has always the same
and only name. Is there some way to stop this renaming
of root filesystem to /dev/root and let it be as in old
baselayout1?
Jarry
--
_______________________________________________________________
This mailbox accepts e-mails only from selected mailing-lists!
Everything else is considered to be spam and therefore deleted.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [gentoo-user] Re: how can I disable renaming of root fs to "/dev/root"?
2011-11-11 17:37 [gentoo-user] how can I disable renaming of root fs to "/dev/root"? Jarry
@ 2011-11-12 2:52 ` Nikos Chantziaras
2011-11-12 11:43 ` [gentoo-user] " victor romanchuk
1 sibling, 0 replies; 5+ messages in thread
From: Nikos Chantziaras @ 2011-11-12 2:52 UTC (permalink / raw
To: gentoo-user
On 11/11/2011 07:37 PM, Jarry wrote:
> Hi,
> this is actually not problem but rather a matter of customs:
> My new fresh installed system shows root-fs in "df" as
> /dev/root, not actuall device (in my case /dev/md2).
>
> I think I coud get used to it, but some software still needs
> /dev/md2 (i.e. lilo), other does not find /dev/md2 anymore
> and needs /dev/root to work properly (i.e. monit).
>
> Moreover, in /etc/fstab I still have to use /dev/md2 as root
> filesystem, while /etc/mtab shows only /dev/root.
>
> I do not like such a mess and I'd like to put it in rather
> consistent state where root filesystem has always the same
> and only name.
/dev/root *is* always the same and only name. It's always /dev/root.
That makes is the only and same everywhere :-/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] how can I disable renaming of root fs to "/dev/root"?
2011-11-11 17:37 [gentoo-user] how can I disable renaming of root fs to "/dev/root"? Jarry
2011-11-12 2:52 ` [gentoo-user] " Nikos Chantziaras
@ 2011-11-12 11:43 ` victor romanchuk
2011-11-12 16:16 ` [gentoo-user] " Hartmut Figge
2011-11-13 10:33 ` [gentoo-user] " Alan Mackenzie
1 sibling, 2 replies; 5+ messages in thread
From: victor romanchuk @ 2011-11-12 11:43 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 987 bytes --]
Jarry wrote, at 11/11/2011 09:37 PM:
> Hi,
> this is actually not problem but rather a matter of customs:
> My new fresh installed system shows root-fs in "df" as
> /dev/root, not actuall device (in my case /dev/md2).
>
> I think I coud get used to it, but some software still needs
> /dev/md2 (i.e. lilo), other does not find /dev/md2 anymore
> and needs /dev/root to work properly (i.e. monit).
>
> Moreover, in /etc/fstab I still have to use /dev/md2 as root
> filesystem, while /etc/mtab shows only /dev/root.
>
> I do not like such a mess and I'd like to put it in rather
> consistent state where root filesystem has always the same
> and only name. Is there some way to stop this renaming
> of root filesystem to /dev/root and let it be as in old
> baselayout1?
>
> Jarry
try that patch (attached):
sometime ago i have found it in gentoo forums. probably did few modifications in
the original i found, cannot remember. it works for me for months with no
visible problems
victor
[-- Attachment #2: mtab.patch --]
[-- Type: text/x-patch, Size: 804 bytes --]
--- mtab.orig 2011-05-09 10:39:38.510430618 +0400
+++ /etc/init.d/mtab 2011-11-12 15:23:23.113980922 +0400
@@ -12,6 +12,9 @@
start()
{
+ # look in an easy way to where root is mounted from
+ ROOTFS=$(readlink -f /dev/root)
+
# /etc/mtab could be a symlink to /proc/mounts
if [ ! -w /etc/mtab -a -L /etc/mtab ]; then
eeinfo "Skipping mtab update (non writeable symlink)"
@@ -28,7 +31,8 @@
# makes / readonly and dismounts all tmpfs even if in use which is
# not good. Luckily, umount uses /etc/mtab instead of /proc/mounts
# which allows this hack to work.
- grep -v "^[^ ]* / tmpfs " /proc/mounts > /etc/mtab
+ grep -v "^[^ ]* / tmpfs " /proc/mounts |
+ awk '$1 != "rootfs" {print}' | sed 's%/dev/root%'${ROOTFS}'%' > /etc/mtab
# Remove stale backups
rm -f /etc/mtab~ /etc/mtab~~
^ permalink raw reply [flat|nested] 5+ messages in thread
* [gentoo-user] Re: how can I disable renaming of root fs to "/dev/root"?
2011-11-12 11:43 ` [gentoo-user] " victor romanchuk
@ 2011-11-12 16:16 ` Hartmut Figge
2011-11-13 10:33 ` [gentoo-user] " Alan Mackenzie
1 sibling, 0 replies; 5+ messages in thread
From: Hartmut Figge @ 2011-11-12 16:16 UTC (permalink / raw
To: gentoo-user
victor romanchuk:
>try that patch (attached):
Thanks for that. Here is a comparison:
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 151187140 92949648 50557624 65% /
/dev/root 151187140 92949648 50557624 65% /
rc-svcdir 1024 96 928 10% /lib/rc/init.d
[...]
With patch:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda5 151187140 92949656 50557616 65% /
rc-svcdir 1024 96 928 10% /lib/rc/init.d
[...]
>sometime ago i have found it in gentoo forums. probably did few modifications in
>the original i found, cannot remember. it works for me for months with no
>visible problems
I will wait for problems to occur. ;)
Hartmut
--
Usenet-ABC-Wiki http://www.usenet-abc.de/wiki/
Von Usern fuer User :-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [gentoo-user] how can I disable renaming of root fs to "/dev/root"?
2011-11-12 11:43 ` [gentoo-user] " victor romanchuk
2011-11-12 16:16 ` [gentoo-user] " Hartmut Figge
@ 2011-11-13 10:33 ` Alan Mackenzie
1 sibling, 0 replies; 5+ messages in thread
From: Alan Mackenzie @ 2011-11-13 10:33 UTC (permalink / raw
To: gentoo-user
Hello, Victor.
On Sat, Nov 12, 2011 at 03:43:33PM +0400, victor romanchuk wrote:
> Jarry wrote, at 11/11/2011 09:37 PM:
> > Hi,
> > this is actually not problem but rather a matter of customs:
> > My new fresh installed system shows root-fs in "df" as
> > /dev/root, not actuall device (in my case /dev/md2).
[ .... ]
> > Jarry
> try that patch (attached):
Thank you very much for this. This annoyance has been bugging me for
quite some time, but not severely enough to make me try and fix it for
myself. It even works for mount. :-)
--
Alan Mackenzie (Nuremberg, Germany).
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-11-13 10:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-11 17:37 [gentoo-user] how can I disable renaming of root fs to "/dev/root"? Jarry
2011-11-12 2:52 ` [gentoo-user] " Nikos Chantziaras
2011-11-12 11:43 ` [gentoo-user] " victor romanchuk
2011-11-12 16:16 ` [gentoo-user] " Hartmut Figge
2011-11-13 10:33 ` [gentoo-user] " Alan Mackenzie
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox