qzroadqqx
Posts: 22
Joined: Sat Jan 19, 2013 5:08 pm

Problems around config.txt

Wed Jan 23, 2013 9:47 am

My problems with config.txt are:
1.-I can not edit this file in / boot as it is read only and I can not change the attributes of this file (chmod or chown commands do not work. The owner is root but being SU these commands do not work). :oops:
From windows I can edit the file.
2.-I tried to rotate the screen 90 degrees to see if config.txt is running with negative results :( . (An easy way to verify the implementation of the directives of config.txt?)
I want to test if the RCA works. Does the HDMI connection detection by Raspberry is priority over config.txt?

Some ideas? Are there only one filesystem problem?
Thanks in advance

User avatar
RaTTuS
Posts: 10559
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Problems around config.txt

Wed Jan 23, 2013 9:58 am

are you using raspbian
sudo nano /etc/config.txt should work
if not see if something is reported in
cat /var/log/syslog
if it is readonly because of corruption then you may have an issue
how long have you been running the RPi?
have you
sudo apt-get update && sudo apt-get upgrade sucessfully

you may be able to
sudo umount /boot
sudo fsck.msdos /dev/mmcblk0p1
sudo mount /mmcblk0p1 /boot
to recover
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: Problems around config.txt

Wed Jan 23, 2013 10:01 am

You need root access to modify config.txt file this is done by using the sudo prefix.
Therefore you use: sudo pico /boot/config.txt to edit your configuration file.

The other alternative is access your SD Card from a USB card reader in Windows / Mac with notepad++

Richard S.

qzroadqqx
Posts: 22
Joined: Sat Jan 19, 2013 5:08 pm

Re: Problems around config.txt

Wed Jan 23, 2013 11:19 am

RaTTuS wrote:are you using raspbian
sudo nano /etc/config.txt should work
sudo nano /etc/config.txt do not work "Warning: Not write permission"
if not see if something is reported in
cat /var/log/syslog
The output of command cat /var/log/syslog contains this entries
Jan 23 11:11:20 raspberrypi kernel: FAT-fs (mmcblk0p1): error, fat_get_cluster: invalid cluster chain (i_pos 921474)
Jan 23 11:11:20 raspberrypi kernel: FAT-fs (mmcblk0p1): Filesystem has been set read-only
if it is readonly because of corruption then you may have an issue
how long have you been running the RPi?
My raspi is running for more than 7 months
have you
sudo apt-get update && sudo apt-get upgrade sucessfully
Yes with "minor" problems.
you may be able to
sudo umount /boot
No, the system says:
umount: /boot: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
sudo fsck.msdos /dev/mmcblk0p1
sudo mount /mmcblk0p1 /boot
to recover

DirkS
Posts: 10363
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Problems around config.txt

Wed Jan 23, 2013 6:00 pm

sudo nano /etc/config.txt do not work "Warning: Not write permission"
That should be

Code: Select all

sudo nano /boot/config.txt
Gr.
Dirk.

qzroadqqx
Posts: 22
Joined: Sat Jan 19, 2013 5:08 pm

Re: Problems around config.txt

Thu Jan 24, 2013 12:06 am

Following the instructions of RaTTuS the result seems that the file system is corrupted.
There is some utility to try to fix it?
Does ssd card can be physically damaged or can repair with a format?

User avatar
Jim JKla
Posts: 2218
Joined: Sun Jan 29, 2012 11:15 pm
Location: Newcastle upon Tyne UK

Re: Problems around config.txt

Thu Jan 24, 2013 12:14 am

You can allways re-image the SD card if you make an image after significant changes you can allways create a new SD using that backed up image.

A bit like saved games in a text adventure.

If you are using a Big SD the image can be quite large however there are methods for shrinkage (mentioned lots in other forum threads)

An SD can be damaged repeatted writes can do this (the number is quite large). ;)
Noob is not derogatory the noob is just the lower end of the noob--geek spectrum being a noob is just your first step towards being an uber-geek ;)

If you find a solution please post it in the wiki the forum dies too quick

User avatar
RaTTuS
Posts: 10559
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Problems around config.txt

Thu Jan 24, 2013 8:34 am

qzroadqqx wrote:
sudo umount /boot
No, the system says:
umount: /boot: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
make sure that you are not in that directory
i.e. log out all other sessions
and type
cd ~
then umount again

sudo fsck.msdos /dev/mmcblk0p1
sudo mount /mmcblk0p1 /boot
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

User avatar
rurwin
Forum Moderator
Forum Moderator
Posts: 4258
Joined: Mon Jan 09, 2012 3:16 pm
Contact: Website

Re: Problems around config.txt

Thu Jan 24, 2013 9:18 am

If that fails, type

Code: Select all

sudo init 1
and then try again.

(It puts you in "single user mode", with the bare minimum of stuff running and just a single command-line for company. A bit like Windows "Safe Mode".)

qzroadqqx
Posts: 22
Joined: Sat Jan 19, 2013 5:08 pm

Re: Problems around config.txt

Thu Jan 24, 2013 10:34 am

RaTTuS wrote:
qzroadqqx wrote:
sudo umount /boot
No, the system says:
umount: /boot: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
make sure that you are not in that directory
i.e. log out all other sessions
and type
cd ~
then umount again
:oops: Iwas on /boot
sudo fsck.msdos /dev/mmcblk0p1
sudo mount /mmcblk0p1 /boot :?:
mipi@raspi:/home$ sudo umount /boot
mipi@raspi:/home$ sudo fsck.msdos /dev/mmcblk0p1
dosfsck 3.0.9, 31 Jan 2010, FAT32, LFN
FATs differ but appear to be intact. Use which FAT ?
1) Use first FAT
2) Use second FAT
? 1
/oconfig.txt
Contains a free cluster (28160). Assuming EOF.
/oconfig.txt
File size is 30512 bytes, cluster chain length is 6144 bytes.
Truncating file to 6144 bytes.
/CONFIG.TXT
Contains a free cluster (28161). Assuming EOF.
/CONFIG.TXT
File size is 30720 bytes, cluster chain length is 0 bytes.
Truncating file to 0 bytes.
Free cluster summary wrong (48059 vs. really 48089)
1) Correct
2) Don't correct
? 1
Leaving file system unchanged.
/dev/mmcblk0p1: 15 files, 28097/76186 clusters

mipi@raspi:/home$ sudo mount /mmcblk0p1 /boot
mount: special device /mmcblk0p1 does not exist
mipi@raspi:/home$

I try the next command with success
mipi@raspi:/home$ sudo mount /dev/mmcblk0p1 /boot


Sudo nano /boot/config.txt nano says "no write permission" :(

User avatar
RaTTuS
Posts: 10559
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Problems around config.txt

Thu Jan 24, 2013 10:41 am

copy all the files off the /boot partition
re-check it again and fix the errors
re mount it
check /var/log/syslog for errors
if it cannot fix them you may have to format that partition as vfat
and replace the files again
having copied things on to the partition do a
sudo sync && sudo sync
and check syslog again for errors

then run
sudo apt-get update && sudo apt-get upgrade
before rebooting
check again for errors

if you are having a lot of errors check you power
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

qzroadqqx
Posts: 22
Joined: Sat Jan 19, 2013 5:08 pm

Re: Problems around config.txt

Thu Jan 24, 2013 12:20 pm

RaTTuS wrote:copy all the files off the /boot partition
re-check it again and fix the errors
re mount it
check /var/log/syslog for errors
From Syslog
Jan 24 13:02:32 raspberrypi kernel: FAT-fs (mmcblk0p1): error, fat_get_cluster: invalid cluster chain (i_pos 921472)
Jan 24 13:02:32 raspberrypi kernel: FAT-fs (mmcblk0p1): Filesystem has been set read-only
I do not know how fix this error
if it cannot fix them you may have to format that partition as vfat
Command and what parameters should I use to format this partition?, Please :oops:
and replace the files again
having copied things on to the partition do a
sudo sync && sudo sync
and check syslog again for errors

then run
sudo apt-get update && sudo apt-get upgrade
before rebooting
check again for errors

if you are having a lot of errors check you power

User avatar
RaTTuS
Posts: 10559
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Problems around config.txt

Thu Jan 24, 2013 12:32 pm

login
mkdir boot.bak
cp /boot/* boot.bak

sudo umount /boot
sudo fsck.msdos -a /dev/mmcblk0p1

^ fix all errors

sudo mount /dev/mmcblk0p1 /boot
tail /val/log/syslog
sudo echo . >/boot/poo
tail /val/log/syslog
sudo rm /boot/poo
tail /val/log/syslog

^ if it is still readonly then

sudo umount /boot

WARNING from here onwards you can trash your boot so it will not boot
this will mean you cannot boot from the SD card

sudo mkfs.msdos /dev/mmblk0p1
sudo mount /dev/mmblk0p1 /boot
sudo cp boot.bak/* /boot
sudo sync
tail /val/log/syslog
sudo sync

if it is still read only then you probably [deffo] will have to reflash from scratch or us another SD card

sudo apt-get update && sudo apt-get upgrade
tail /val/log/syslog
sudo sync

now we will try and boot from the new improved system
sudo shutdown -r now
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

qzroadqqx
Posts: 22
Joined: Sat Jan 19, 2013 5:08 pm

Re: Problems around config.txt

Thu Jan 24, 2013 2:59 pm

RaTTuS wrote:login
mkdir boot.bak
cp /boot/* boot.bak

sudo umount /boot
sudo fsck.msdos -a /dev/mmcblk0p1

^ fix all errors

sudo mount /dev/mmcblk0p1 /boot
tail /val/log/syslog
sudo echo . >/boot/poo
tail /val/log/syslog
sudo rm /boot/poo
tail /val/log/syslog
Repaired, now I may edit on /boot. 8-)
Thank you very much
^ if it is still readonly then

sudo umount /boot

WARNING from here onwards you can trash your boot so it will not boot
this will mean you cannot boot from the SD card

sudo mkfs.msdos /dev/mmblk0p1
sudo mount /dev/mmblk0p1 /boot
sudo cp boot.bak/* /boot
sudo sync
tail /val/log/syslog
sudo sync

if it is still read only then you probably [deffo] will have to reflash from scratch or us another SD card

sudo apt-get update && sudo apt-get upgrade
tail /val/log/syslog
sudo sync

now we will try and boot from the new improved system
sudo shutdown -r now

Return to “Beginners”