Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
FSTAB problems [Solved]
FSTAB problems [Solved]
Hi good night, i have problems with FSTAB (i think..)
I was doing tests with mount/umount USB, write access etc...
Then i try to mount at reboot the USB drive with RW permissions... With echo /etc/fstab bla bla bla ...
When i reboot to try, X doesn't work... Only i can access to Desktop using: mount -o remount,rw /
or editing the boot options line: linux= .... changing ro for rw and adding at end 'single'
Then i can load normally.
When i try to edit fstab i can't do nothing... I get error message saying something like: is only read archive...
And FSTAB only have my echo lane and nothing more...
What can i do ?
PD: Sorry for my english id you don't understand something.
I was doing tests with mount/umount USB, write access etc...
Then i try to mount at reboot the USB drive with RW permissions... With echo /etc/fstab bla bla bla ...
When i reboot to try, X doesn't work... Only i can access to Desktop using: mount -o remount,rw /
or editing the boot options line: linux= .... changing ro for rw and adding at end 'single'
Then i can load normally.
When i try to edit fstab i can't do nothing... I get error message saying something like: is only read archive...
And FSTAB only have my echo lane and nothing more...
What can i do ?
PD: Sorry for my english id you don't understand something.
Last edited by awachens on 2018-01-05 05:50, edited 1 time in total.
Re: FSTAB problems
i really didn't understand very much.
did you use google translate?
anyhow, i think it's better you show us the exact commands that led up to this situation, and their output.
please use code tags for code.
did you use google translate?
anyhow, i think it's better you show us the exact commands that led up to this situation, and their output.
please use code tags for code.
Re: FSTAB problems
I'm sorry xD NO!! I don't use google translation. I can't write exactly output... Because my laptop haven't internet connection.
I use:
With this command i wanna try to moung automatically mount the USB drive with RW permission.
When i reboot my laptop X server (graphic desktop) doesn't load.
I search in google and i try this in console (single user):
Then graphic desktop load normally...
Now i wanna return normal FSTAB or load graphic desktop normally like always...
When i try to edit /etc/fstab
Debian say's: W10: Warning: Changing a readonly file
E303: Unable to open swap file for "/etc/fstab", recovery impossible
E37: No write since last change (add ! to override)
----------------------------------------------------> This is my first tried
I try to edit boot sequence with "e" when debian is loading (charging)
In the line starting with linux=, I switched the 'ro' to 'rw' and added the word 'single' at the very end of the line.
Then i press f10 to boot.
once it booted, as root, I did:
Try again :
Debian say's: W10: Warning: Changing a readonly file
E303: Unable to open swap file for "/etc/fstab", recovery impossible
E37: No write since last change (add ! to override)
---------------------------------------------------------------------> Second tried
What can i do ?
I use:
Code: Select all
echo /etc/fstab /dev/sda1 /media/usb/ ntfs rw,nobo,noauto 0 0
When i reboot my laptop X server (graphic desktop) doesn't load.
I search in google and i try this in console (single user):
Code: Select all
mount -o remount,rw /
Now i wanna return normal FSTAB or load graphic desktop normally like always...
When i try to edit /etc/fstab
Code: Select all
vi /etc/fstab
E303: Unable to open swap file for "/etc/fstab", recovery impossible
Code: Select all
:q
----------------------------------------------------> This is my first tried
I try to edit boot sequence with "e" when debian is loading (charging)
In the line starting with linux=, I switched the 'ro' to 'rw' and added the word 'single' at the very end of the line.
Then i press f10 to boot.
once it booted, as root, I did:
Code: Select all
mount -o remount,rw /
Code: Select all
vi /etc/fstab
E303: Unable to open swap file for "/etc/fstab", recovery impossible
Code: Select all
:q
---------------------------------------------------------------------> Second tried
What can i do ?
Re: FSTAB problems
It's not easy if you are new to linux and accidentally deleted your fstab, but it can be fixed. If you are new it will take you awhile to understand, so maybe a reinstall is going to be quicker and easier for you.
if you use something simple like this
and you get either a blank, or an error that file doesn't exist, then you deleted it.
https://duckduckgo.com/html/?q=deleted+fstab
if you use something simple like this
Code: Select all
cat /etc/fstab
https://duckduckgo.com/html/?q=deleted+fstab
resigned by AI ChatGPT
Re: FSTAB problems
Hi, thx for the quick answer.
I'm a "little" new. I'm not 100% new but... A little be.. xD
I only use this command:
I think this doesn't overwrite fstab, no ?
Then i reboot and charge with shell...
I will read this tomorrow.
Thx again !
EDIT: Ah! I forgot. I will not reinstall debian, i wanna learn it.
I'm a "little" new. I'm not 100% new but... A little be.. xD
I only use this command:
Code: Select all
echo /etc/fstab /dev/sda1 /media/usb/ ntfs rw,nobo,noauto 0 0
Then i reboot and charge with shell...
I will read this tomorrow.
Thx again !
EDIT: Ah! I forgot. I will not reinstall debian, i wanna learn it.
Re: FSTAB problems
that command won't overwrite it, but one little character like '>' in the wrong place and it's botched. Here's an example:awachens wrote:
I only use this command:I think this doesn't overwrite fstab, no ?Code: Select all
echo /etc/fstab /dev/sda1 /media/usb/ ntfs rw,nobo,noauto 0 0
Code: Select all
$ cat fstab
UUID=9871468756187356138975163 / ext4 defaults,discard,noatime,errors=remount-ro 0 1
UUID=987146875684715687936187356138975163 none swap defaults 0 2
UUID=34756138795613577356138975163 /media/whatever fs defaults,noauto 0 0
$ echo fstab /dev/sda1 /media/usb/ ntfs rw,nobo,noauto 0 0
fstab /dev/sda1 /media/usb/ ntfs rw,nobo,noauto 0 0
$ echo > fstab /dev/sda1 /media/usb/ ntfs rw,nobo,noauto 0 0
$ cat fstab
/dev/sda1 /media/usb/ ntfs rw,nobo,noauto 0 0
resigned by AI ChatGPT
Re: FSTAB problems
Hi! I think I don’t use these character ... so i dint know what can. be happen
Good night !!
Good night !!
Re: FSTAB problems [Solved]
Hi! I solved it with your link thank you.
But now I can’t write in my usb.. I use chmod 777 /media/usb
But I have only read permission ...
What can I do ?
Regards !
But now I can’t write in my usb.. I use chmod 777 /media/usb
But I have only read permission ...
What can I do ?
Regards !
-
- Posts: 1405
- Joined: 2009-09-10 20:15
- Location: Saint-Petersburg, Russian Federation
- Been thanked: 11 times
Re: FSTAB problems [Solved]
It is an extra action. Create on this usb-flash the directory with any name, for example, nobody by commands as root:awachens wrote: But now I can’t write in my usb.. I use chmod 777 /media/usb
Code: Select all
cd /media/usb
mkdir -p nobody
chown nobody:nogroup nobody
chmod 775 nobody
usermod -a -G nogroup <user>
Then after next logging this <user > and any user in nogroup will be able to write in nobody/.
Peter.
Re: FSTAB problems [Solved]
Good night.
Ok, i make directory with write permissions ... drwxrwxr-x 2 nobo nobo
But... When i mount the USB on this patch... Permissions change to:
dr-x------ 1 root root
Don't understand.
Regards !
EDIT: I tried too.
EDIT2: Ok, i format my USB and now works fine
Ok, i make directory with write permissions ... drwxrwxr-x 2 nobo nobo
But... When i mount the USB on this patch... Permissions change to:
dr-x------ 1 root root
Don't understand.
Regards !
EDIT: I tried
Code: Select all
sudo mount -o rw /dev/sdXY usb
EDIT2: Ok, i format my USB and now works fine
-
- Posts: 1405
- Joined: 2009-09-10 20:15
- Location: Saint-Petersburg, Russian Federation
- Been thanked: 11 times
Re: FSTAB problems [Solved]
Excuse me, perhaps, I not exactly said.
Directory "nobody" must be on usb-flash. I had mean that it already mounted in /media/usb.
Insert it, if it will has been mounted in /media/usb/, execute these commands, otherwise mount it as root:
x - your disk.
After these commands user belong "nogroup" will be able to write in nobody/ on usb-flash.
Peter.
Directory "nobody" must be on usb-flash. I had mean that it already mounted in /media/usb.
Insert it, if it will has been mounted in /media/usb/, execute these commands, otherwise mount it as root:
Code: Select all
mount /dev/sdx1 /media/usb
After these commands user belong "nogroup" will be able to write in nobody/ on usb-flash.
Peter.
Re: FSTAB problems [Solved]
Hi, i have a question... nobody is treated like a group ? recognized on debian ? Because i haven'y any nobody group :S
Afetr format, i mount USB normally and works.. Maybe the error is on MBR ?
Regards !
Afetr format, i mount USB normally and works.. Maybe the error is on MBR ?
Regards !
-
- Posts: 1405
- Joined: 2009-09-10 20:15
- Location: Saint-Petersburg, Russian Federation
- Been thanked: 11 times
Re: FSTAB problems [Solved]
"nobody" is a user nobody and it is in the group "nogroup".
From /etc/passwd:
From /etc/group:
Directory "nobody" and these commands are needed if usb-flash is formatted in extended FS.
For the file systems without Unix permissions it is not needed.
Peter.
From /etc/passwd:
Code: Select all
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
Code: Select all
nogroup:x:65534:peter,_apt
For the file systems without Unix permissions it is not needed.
Peter.
Re: FSTAB problems [Solved]
awachens, have you installed debian to that usb drive?
is your intention to use debian with the default (or any) desktop environment?
i have the feeling that your solutions are overly complex, unsuited for a desktop environment, and brittle.
i also have the feeling that you don't understand that you have to become root to edit certain files. hence permission denied / read only errors.
is your intention to use debian with the default (or any) desktop environment?
i have the feeling that your solutions are overly complex, unsuited for a desktop environment, and brittle.
i also have the feeling that you don't understand that you have to become root to edit certain files. hence permission denied / read only errors.
Re: FSTAB problems [Solved]
Good morning. Yes I don’t know why my solutions are very complex jajaja
I have debian 9 xfce4 on hp stream 11.
This usb is for copy sig archives of apt-offline. I think I should write about apt-offline because never work (in new thread).
Yes I know I should become root to edit some archives .. for example with sudo sometimes I can’t edit, before I think sudo and root are the same but it seems that no...
What is wrong ?
Regards and thx for be patient!
I have debian 9 xfce4 on hp stream 11.
This usb is for copy sig archives of apt-offline. I think I should write about apt-offline because never work (in new thread).
Yes I know I should become root to edit some archives .. for example with sudo sometimes I can’t edit, before I think sudo and root are the same but it seems that no...
What is wrong ?
Regards and thx for be patient!