Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
little mistake but annoying (root partition ro)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
elfenland
n00b
n00b


Joined: 19 Apr 2016
Posts: 11
Location: Konstanz, Germany

PostPosted: Wed Jun 22, 2016 12:23 pm    Post subject: little mistake but annoying (root partition ro) Reply with quote

Hi guys, I followed the amd64 installation manual for my lenovo X220 thinkpad with 2 i7 CPU.
Installation, compiling and configuration went well.

But the boot message shows some erros at the end
* System starts and runs, but the / partition (root) is mounted readonly. Why is that?
* How can I display my boot messages afterwards, plz?

With grub I have got another Problem but can t display it here..

thanks in advance,

elfenland
_________________
heartful greetings
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43178
Location: 56N 3W

PostPosted: Wed Jun 22, 2016 12:38 pm    Post subject: Reply with quote

elfenland,

There are several reasons why root con be read only.
Mostly, because rootfsck failed or found some errors that it could not fix.

look in dmesg for hints. Try
Code:
dmesg | less


As root is read only, there is nowhere to write logs, so you won't have any.
Put dmesg on a pasrebin.

Did you tell the kernel that root should be read only?
The kernel kine in grub.cfg should not have the ro option.
Root is mounted ro to start with then remouted rw after rootfsck runs and confirms that there are no problems with the filesystem.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
elfenland
n00b
n00b


Joined: 19 Apr 2016
Posts: 11
Location: Konstanz, Germany

PostPosted: Wed Jun 22, 2016 12:53 pm    Post subject: Reply with quote

PS:
of course in my fstab it has the options "noatime,discard" and I tried it with "noatime" only.
It is an SSD - what exactly does it mean "discard"?

However in the /boot/grub/grub.cfg file there is a line where it says "root"... "ro". I am not so familiar with grub cfg...
_________________
heartful greetings
Back to top
View user's profile Send private message
elfenland
n00b
n00b


Joined: 19 Apr 2016
Posts: 11
Location: Konstanz, Germany

PostPosted: Wed Jun 22, 2016 12:56 pm    Post subject: Reply with quote

ok, thanks for that quick reply.. I ll copy and paste these lines and we ll find the solution quick :-)
_________________
heartful greetings
Back to top
View user's profile Send private message
elfenland
n00b
n00b


Joined: 19 Apr 2016
Posts: 11
Location: Konstanz, Germany

PostPosted: Wed Jun 22, 2016 1:21 pm    Post subject: :-) Reply with quote

OK. I guess I did it wrong with my fstab..
Do you get it, whats wrong?

Maybe it is these bold options that I used.
"noatime and notail" I read that in some manuals and it is supposed to increase speed. Is that true and a good option??

"discard" I read that one here:[url] http://www.thinkwiki.org/wiki/Installing_Gentoo_on_a_ThinkPad_X220[/url]
Good advice?

Quote:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#

# <file system> <mount point> <type> <options> <dump> <pass>

# BOOT
/dev/sda1 /boot ext3 defaults 0 2

# GENTOO
/dev/sda3 / reiserfs noatime,discard 0 1

# HOME
devsda7 /home ext4 noatime,discard 0 2

# MINT CINNAMON
/dev/sda6 /mint ext4 errors=remount-ro,noatime,noauto 0 2

# WIN
/dev/sda2 /win ntfs utf8,umask=007,gid=46,noauto 0 1

# SWAP
/dev/sda5 none swap sw 0 0
Back to top
View user's profile Send private message
elfenland
n00b
n00b


Joined: 19 Apr 2016
Posts: 11
Location: Konstanz, Germany

PostPosted: Wed Jun 22, 2016 1:22 pm    Post subject: Reply with quote

so I dont have a dmesg BUT I read during bootup that It is trying to mount root partition but gets an error..

That should be enough info I hope..
_________________
heartful greetings
Back to top
View user's profile Send private message
pilla
Administrator
Administrator


Joined: 07 Aug 2002
Posts: 7693
Location: Pelotas, BR

PostPosted: Wed Jun 22, 2016 1:33 pm    Post subject: Reply with quote

From man mount:

Code:

       discard
              Disable/enable  the  discard  mount  option.  The discard function issues frequent commands to let the
              block device reclaim space freed by the filesystem.  This is useful for  SSD  devices,  thinly  provi-
              sioned  LUNs  and  virtual machine images, but may have a significant performance impact.  (The fstrim
              command is also available to initiate batch trims from userspace.)



It would be better if you could post the actual message of the error concerning the mount of the root partition.
_________________
"I'm just very selective about the reality I choose to accept." -- Calvin
Back to top
View user's profile Send private message
elfenland
n00b
n00b


Joined: 19 Apr 2016
Posts: 11
Location: Konstanz, Germany

PostPosted: Wed Jun 22, 2016 2:03 pm    Post subject: Reply with quote

right..
So here we go:

*root fs could not be mounted r/w
[...]

* checking local filesystems
"...because /etc/mtab is missing ext2fs_check cannot see if the fs /dev/sda1 iis mounted"

*operational error

* remounting root fs read/write
-mount: / is not mounted yet or wrong options
* updating mtab
* /etc is not writeable yet
*activating swap (green)
*mounting local fs
- wrong fs type, bad superblock on sda1, wrong options, missing code page or different error.

...

And here is the grub cfg file that linux mint installer created. (BOLD) the option I chose to boot.

Quote:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
if [ "${next_entry}" ] ; then
set default="${next_entry}"
set next_entry=
save_env next_entry
set boot_once=true
else
set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi

function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}

if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos6'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6 ed64eb91-876b-4e00-bb0c-ea2352b3cdad
else
search --no-floppy --fs-uuid --set=root ed64eb91-876b-4e00-bb0c-ea2352b3cdad
fi
font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=de_DE
insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
set timeout=30
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=10
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
set timeout=10
fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/06_mint_theme ###
set menu_color_normal=white/black
set menu_color_highlight=white/light-gray
### END /etc/grub.d/06_mint_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="${1}"
if [ "${1}" = "keep" ]; then
set vt_handoff=vt.handoff=7
else
set vt_handoff=
fi
}
if [ "${recordfail}" != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Linux Mint 17.3 Cinnamon 64-bit' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-ed64eb91-876b-4e00-bb0c-ea2352b3cdad' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 6d4f9a18-1380-44b7-9b99-95c0c0a3d535
else
search --no-floppy --fs-uuid --set=root 6d4f9a18-1380-44b7-9b99-95c0c0a3d535
fi
linux /vmlinuz-3.19.0-32-generic root=UUID=ed64eb91-876b-4e00-bb0c-ea2352b3cdad ro quiet splash $vt_handoff
initrd /initrd.img-3.19.0-32-generic
}
submenu 'Erweiterte Optionen für Linux Mint 17.3 Cinnamon 64-bit' $menuentry_id_option 'gnulinux-advanced-ed64eb91-876b-4e00-bb0c-ea2352b3cdad' {
menuentry 'Linux Mint 17.3 Cinnamon 64-bit, mit Linux 3.19.0-32-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.19.0-32-generic-advanced-ed64eb91-876b-4e00-bb0c-ea2352b3cdad' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 6d4f9a18-1380-44b7-9b99-95c0c0a3d535
else
search --no-floppy --fs-uuid --set=root 6d4f9a18-1380-44b7-9b99-95c0c0a3d535
fi
echo 'Linux 3.19.0-32-generic wird geladen …'
linux /vmlinuz-3.19.0-32-generic root=UUID=ed64eb91-876b-4e00-bb0c-ea2352b3cdad ro quiet splash $vt_handoff
echo 'Initiale Ramdisk wird geladen …'
initrd /initrd.img-3.19.0-32-generic
}
menuentry 'Linux Mint 17.3 Cinnamon 64-bit, with Linux 3.19.0-32-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.19.0-32-generic-recovery-ed64eb91-876b-4e00-bb0c-ea2352b3cdad' {
recordfail
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 6d4f9a18-1380-44b7-9b99-95c0c0a3d535
else
search --no-floppy --fs-uuid --set=root 6d4f9a18-1380-44b7-9b99-95c0c0a3d535
fi
echo 'Linux 3.19.0-32-generic wird geladen …'
linux /vmlinuz-3.19.0-32-generic root=UUID=ed64eb91-876b-4e00-bb0c-ea2352b3cdad ro recovery nomodeset
echo 'Initiale Ramdisk wird geladen …'
initrd /initrd.img-3.19.0-32-generic
}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/10_lupin ###
### END /etc/grub.d/10_lupin ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry 'Memory test (memtest86+)' {
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 6d4f9a18-1380-44b7-9b99-95c0c0a3d535
else
search --no-floppy --fs-uuid --set=root 6d4f9a18-1380-44b7-9b99-95c0c0a3d535
fi
knetbsd /memtest86+.elf
}
menuentry 'Memory test (memtest86+, serial console 115200)' {
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 6d4f9a18-1380-44b7-9b99-95c0c0a3d535
else
search --no-floppy --fs-uuid --set=root 6d4f9a18-1380-44b7-9b99-95c0c0a3d535
fi
linux16 /memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Gentoo Base System release 2.2 (auf /dev/sda3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-cf4ae33e-946f-47c5-9d42-d1ae99a99d36' {
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 6d4f9a18-1380-44b7-9b99-95c0c0a3d535
else
search --no-floppy --fs-uuid --set=root 6d4f9a18-1380-44b7-9b99-95c0c0a3d535
fi
linux /vmlinuz-3.19.0-32-generic root=/dev/sda3
initrd /initrd.img-3.19.0-32-generic
}
submenu 'Erweiterte Optionen für Gentoo Base System release 2.2 (auf /dev/sda3)' $menuentry_id_option 'osprober-gnulinux-advanced-cf4ae33e-946f-47c5-9d42-d1ae99a99d36' {
menuentry 'Gentoo Base System release 2.2 (auf /dev/sda3)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-3.19.0-32-generic--cf4ae33e-946f-47c5-9d42-d1ae99a99d36' {
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 6d4f9a18-1380-44b7-9b99-95c0c0a3d535
else
search --no-floppy --fs-uuid --set=root 6d4f9a18-1380-44b7-9b99-95c0c0a3d535
fi
linux /vmlinuz-3.19.0-32-generic root=/dev/sda3
initrd /initrd.img-3.19.0-32-generic
}
}

set timeout_style=menu
if [ "${timeout}" = 0 ]; then
set timeout=10
fi
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43178
Location: 56N 3W

PostPosted: Wed Jun 22, 2016 3:13 pm    Post subject: Reply with quote

elfenland,

A few words about the discard option.
SSDs need a separate very slow erase operation before the space can be overwritten.
When an SSD is new, its all erased, so this is not an issue, the drive keeps track of erased space.
When you delete a file, its only unlinked from the filesystem tree and the space it occupies is marked as free,
The data remains on the drive and with some effort, can be recovered. For magnetic hard drives this doesn't matter, overwriting old data just works.

In this situation, an SSD must perform the very slow erase. The discard option has the filesystem tell the SSD that it can erase freed blocks any time it likes. This means that by the time blocks are being reused, they are already erased. Without discard, your SSD will be much slower than a magnetic HDD when space reuse starts.
It also means that you may or may not be able to recover deleted files, it depends on the drive when it actually does the erase.


A few things,
/etc/fstab:
# BOOT
/dev/sda1 /boot ext3 defaults 0 2
try noauto as as option there.

/etc/fstab:
# GENTOO
/dev/sda3 / reiserfs noatime,discard 0 1


Your root is reiserfs but /home and /boot are extX. From your @because /etc/mtab is missing ext2fs_check cannot see if the fs /dev/sda1 iis mounted", I suspect that you are missing ext2fstools and/or reiserfstools. You need both.
I don't know the correct names.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5760

PostPosted: Wed Jun 22, 2016 4:04 pm    Post subject: Reply with quote

elfenland wrote:
"...because /etc/mtab is missing ext2fs_check cannot see if the fs /dev/sda1 iis mounted"

Check your /etc/. Is there a mtab file there? If not then ln -s /proc/self/mounts /etc/mtab.
Back to top
View user's profile Send private message
elfenland
n00b
n00b


Joined: 19 Apr 2016
Posts: 11
Location: Konstanz, Germany

PostPosted: Wed Jun 29, 2016 3:48 pm    Post subject: Solved Reply with quote

OK.
I got it.

It was some simple Mount options that were set false.

"notail" ist not suitable for ext (non journalising)
and
"discard" seems not to work with reiserfs.

The following work.

Greetings,

BORIS
Code:

#

# <file system> <mount point>   <type>  <options>       <dump>  <pass>

# ROOT
# / was on /dev/sda6 during installation
UUID=ed64eb91-876b-4e00-bb0c-ea2352b3cdad /               ext4    errors=remount-ro,discard,noatime 0       1

# BOOT
# /boot was on /dev/sda1 during installation
UUID=6d4f9a18-1380-44b7-9b99-95c0c0a3d535 /boot           ext2    defaults,ro        0       2

# HOME
# /home was on /dev/sda7 during installation
UUID=b326b727-12a8-405e-ae8f-784a46e4ce2a /home           ext4    noatime,discard        0       2

# GENTOO
/dev/sda3 /mnt/gentoo           reiserfs    notail,noatime,noauto        0       2

# WINDOOF
# /win was on /dev/sda2 during installation
UUID=17C35306089A25F0 /win            ntfs    defaults,umask=007,gid=1000 0       0

# SWAP
# swap was on /dev/sda5 during installation
UUID=205e481a-9c45-4d09-bb89-2ed19666570d none            swap    sw              0       0

_________________
heartful greetings
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum