I'm running a custom Raspbmc build on my raspberry pi.
On startup, I always see the message
mount: / not mounted or bad option
The filesystem is still mounted, but still want to know whats causing the trouble.
my /etc/fstab looks like this:
proc /proc proc defaults,noatime,nodiratime 0 0
devpts /dev/pts devpts rw,nosuid,noatime,nodiratime,gid=5,mode=620 0 0
/dev/mmcblk0p1 /boot vfat ro,noatime,nosuid,nodiratime 0 0
UUID=7e790ee3-660b-46ab-8378-d8ea91730162 / ext4 defaults,data=writeback,nobh,nodiratime,noatime 0 0
tmpfs /home/pi/.xbmc/temp tmpfs rw,size=5M,nosuid,noexec,nodev,noatime,nodiratime,gid=1000,uid=1000 0 0
/tmp /var/tmp none rw,noexec,nosuid,nodev,bind 0 0
I would add "errors=remount-ro" after
ext4 default,errore=remount-ro,...
Just try to edit this, let me know-
Related
I need to compress a directory on my Ubuntu server. The directory is about 3.2 Go, and I have 15 Go left over 20 Go available on my server.
I'm using the command: tar -zcvf test src_directory
The command fails with the message:
gzip: stdout: No space left on device
tar: test: Wrote only 6144 of 10240 bytes
tar: Child returned status 1
tar: Error is not recoverable: exiting now
Why is it failing as I have enough space on my server ? (15 Go should be enough)
thanks
EDIT
$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 463M 0 463M 0% /dev
tmpfs 98M 2.2M 96M 3% /run
/dev/xvda1 20G 17G 2.2G 89% /
tmpfs 490M 0 490M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 490M 0 490M 0% /sys/fs/cgroup
tmpfs 24K 0 24K 0% /var/gandi
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 20G 0 disk
└─xvda1 202:1 0 20G 0 part /
xvdz 202:6400 0 512M 0 disk
├─xvdz1 202:6401 0 502M 0 part [SWAP]
└─xvdz2 202:6402 0 10M 0 part
with df, I can see there is only 2.2G left on the disk. How can I have details about what is taking so much space ? Because I know that my application files only take 4.6G.
thanks
Check whether you have enough memory available on the partition you want the archive to be stored in
$: df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 476G 300G 176G 63% /
Also check if you have the permissions necessary to archive the desired directory.
If the problem still persists, I may suggest a filesystem check
$: lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 698.7G 0 disk
├─sda1 8:1 0 500M 0 part /boot
├─sda2 8:2 0 5.8G 0 part [SWAP]
├─sda3 8:3 0 50G 0 part /
├─sda4 8:4 0 1K 0 part
└─sda5 8:5 0 642.4G 0 part /home
# Find the device that matches the mountpoint of the directory in question
# Replace X with the appropriate device
# Replace Y with the appropriate partition
$: sudo fsck -vcck /dev/sdXY
I have a question I have a RO filesystem that is readonly. What I need to change in the file fstab in order to be able to edit system files or the all /etc/ directory editing. I can edit only fstab.
fstab file:
/etc # cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount pt> <type> <options> <dump> <pass>
/dev/root / ext2 rw,noauto 0 1
proc /proc proc defaults 0 0
devpts /dev/pts devpts defaults,gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs mode=0777 0 0
tmpfs /tmp tmpfs defaults 0 0
sysfs /sys sysfs defaults 0 0
I do not know much about Linux, so I will be grateful for your help.
Try the following version and it should work independent of the contents of /etc/fstab:
mount -o remount,rw /dev/xxxx /
Instead of /dev/xxxx, use whatever device is valid for your drive.
this is my /etc/fstab file:
proc /proc proc defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
sysfs /sys sysfs defaults 0 0
/dev/md/0 none swap sw 0 0
/dev/md/1 /boot ext3 defaults 0 0
/dev/md/2 / ext4 usrjquota=quota.user,jqfmt=vfsv0 0 0
How to enable noatime? I do not know exactly where to insert the string.
I think that is:
/dev/md/1 /boot ext3 defaults,noatime 0 0
That´s right? or Is in dev/md/2?
Many thanks.
Yes, that would work. But it makes more sense to delete the defaults placeholder when you add it:
/dev/md/1 /boot ext3 noatime 0 0
You probably care more about adding that mount option to slash, though:
/dev/md/2 / ext4 usrjquota=quota.user,jqfmt=vfsv0,noatime 0 0
How to remount as read-write a destination directory on device? (one folder) I need to replace file, but it's on "Read-only file system", not allow to change permissions. Path to folder: /etc/foo/bar. I need to remount /bar folder. Embedded Linux (busybox), Linux version 2.6.18_pro500
mount -o rw,remount [destination folder]
I tried following, with no success:
<root#elocal:/etc/foo/bar> ls -la
total 6
drwxr-xr-x 2 root 0 98 Jan 18 2011 .
drwxrwxr-x 7 root 0 105 Feb 10 2011 ..
-rw-r--r-- 1 root 0 1052 Jan 18 2011 file1
-rw-r--r-- 1 root 0 270 Jan 18 2011 file2
-rw-r--r-- 1 root 0 1088 Jan 18 2011 file3
-rw-r--r-- 1 root 0 270 Jan 18 2011 file4
mount -o rw,remount /etc/foo/bar
mount: can't find /etc/foo/bar in /proc/mounts
output mount command:
mount
rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro)
proc on /proc type proc (rw)
ramfs on /var type ramfs (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /dev type tmpfs (rw)
devpts on /dev/pts type devpts (rw)
/dev/mtdblock4 on /nvram type jffs2 (rw)
output of cat /proc/mounts
cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / squashfs ro 0 0
proc /proc proc rw 0 0
ramfs /var ramfs rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /dev tmpfs rw 0 0
devpts /dev/pts devpts rw 0 0
/dev/mtdblock4 /nvram jffs2 rw 0 0
Normally, you would use mount -oremount,rw / (/ is the mount point, not /etc/foo/bar).
However, this will not work in your case, per the df output,
rootfs / rootfs rw 0 0
/dev/root / squashfs ro 0 0
your rootfs is using squashfs, which is a read-only file system. See Wikipedia link. Basically, when the filesystem image is created on the build system, it is compressed. Once it is on the target system, it cannot be changed.
You will need to go back to the build system and change the contents and re-build the filesystem image.
Does anyone know whether /proc/mounts is guaranteed to be in the order in which devices are mounted?
For instance:
[root#machine proc]# cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / ext3 rw,data=ordered 0 0
/dev /dev tmpfs rw 0 0
/proc /proc proc rw 0 0
/sys /sys sysfs rw 0 0
/proc/bus/usb /proc/bus/usb usbfs rw 0 0
devpts /dev/pts devpts rw 0 0
/dev/sda1 /boot ext3 rw,data=ordered 0 0
tmpfs /dev/shm tmpfs rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
sunrpc /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
/dev/root /boot ext3 rw,data=ordered 0 0
In the above case, can I be sure that /boot will currently show /dev/root rather than /dev/sda1, which is currently hidden.
I'm guessing the same answer should be true of /etc/mtab.
I'm on RHEL 5.5.
The mount points in /proc/mounts are in mounted order. If you mount a new file system it gets appended to the list of filesystems, essentially obscuring the original mount point.
There are absolutely no guarantees about the content of /etc/mtab, it is purely managed by the userland mount command, so can be bypassed or rewritten arbitrarily, plus you can use the '-n' option to mount will actually omit placing entries in the /etc/mtab, thus making it incorrect relative to the kernel.
As a silly question, why do you need this information?