[SOLVED] i edit my fstab and now i lost my system

Kernels & Hardware, configuring network, installing services

[SOLVED] i edit my fstab and now i lost my system

Postby DRAGSTER_TUNER » 2018-10-15 14:41

Hi everyone!

I was editing my fstab and i made a dumb

I was editing fstab because im using an ssd hd, só i wish to put noatime in the respective line

BUT........ when i was editing, i leave the end of line like that:

noatime,errors 0 0

Instead

noatime,errors=remount-ro 0 0

And now i cant access the hd, even using another debian i have on the other HD.

When i try mount gimme this error:

An error has ocurred accessing hard disk 217,6 GiB', system says: The requested operation has failed: Error mounting system-managed device /dev/sdb1: Command-line `mount "/media/supercharger"' exited with non-zero exit status 32: mount: wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so.

And now i cant access the HD to edit fstab again... someone can help me?
Last edited by DRAGSTER_TUNER on 2018-10-16 23:31, edited 1 time in total.
User avatar
DRAGSTER_TUNER
 
Posts: 25
Joined: 2010-03-28 13:30
Location: Brazil

Re: i edit my fstab and now i lost my system

Postby arochester » 2018-10-15 15:43

Boot from a LiveCD and repair?
arochester
 
Posts: 1336
Joined: 2010-12-07 19:55

Re: i edit my fstab and now i lost my system

Postby bw123 » 2018-10-15 15:50

Show us the command in terminal that you use to mount the partition with the fstab you want to edit. Might help to also show the partition layout with blkid or fdisk -l command.

use code tags for output, please.

Code: Select all
# blkid
# fdisk -l
# mount [-fnrsvw] [-t fstype] [-o options] device dir


I do this now and then, don't stab at it. Think it through. Use a terminal.
User avatar
bw123
 
Posts: 3532
Joined: 2011-05-09 06:02
Location: TN_USA

Re: i edit my fstab and now i lost my system

Postby Head_on_a_Stick » 2018-10-15 19:25

DRAGSTER_TUNER wrote:i wish to put noatime in the respective line

There is no need to make special arrangements for modern SSDs, they will likely outlast their spinning rust equivalents.

Anyway, relatime has been the default for ext4 since kernel 2.6.something and that would be quite sufficient.

Code: Select all
An error has ocurred accessing hard disk 217,6 GiB', system says: The requested operation has failed: Error mounting system-managed device /dev/sdb1: Command-line `mount "/media/supercharger"' exited with non-zero exit status 32: mount: wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so.

Do you have the filesystem tools installed in the environment from which you are attempting to mount the partition?

For ext4 that would be https://packages.debian.org/stretch/e2fsprogs
I suffer from depression and may lash out occasionally, try not to take it personally.
User avatar
Head_on_a_Stick
 
Posts: 8180
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: i edit my fstab and now i lost my system

Postby DRAGSTER_TUNER » 2018-10-16 00:12

bw123:

Code: Select all
blkid
/dev/sdb1: UUID="5d8607cc-5bbd-4442-ad08-82bcc61c9d72" TYPE="ext4" PARTUUID="9831b998-01"
/dev/sdb5: UUID="d6b838d9-ad63-441d-8744-3f1776a30b37" TYPE="swap" PARTUUID="9831b998-05"
/dev/sda1: UUID="69003405-9ab9-4b96-b20d-2e0831ec816e" TYPE="ext4" PARTUUID="0004a750-01"
/dev/sda2: UUID="8f7b1158-831e-4c71-ac80-b2477c53e5be" TYPE="swap" PARTUUID="0004a750-02"
root@supercharger:/home/supercharger# fdisk -l
Disco /dev/sdb: 223,6 GiB, 240057409536 bytes, 468862128 setores
Unidades: setor de 1 * 512 = 512 bytes
Tamanho de setor (lógico/físico): 512 bytes / 512 bytes
Tamanho E/S (mínimo/ótimo): 512 bytes / 512 bytes
Tipo de rótulo do disco: dos
Identificador do disco: 0x9831b998

Dispositivo Inicializar   Início       Fim   Setores Tamanho Id Tipo
/dev/sdb1   *                2048 456282111 456280064  217,6G 83 Linux
/dev/sdb2               456284158 468860927  12576770      6G  5 Estendida
/dev/sdb5               456284160 468860927  12576768      6G 82 Linux swap / Solaris


Disco /dev/sda: 298,1 GiB, 320072933376 bytes, 625142448 setores
Unidades: setor de 1 * 512 = 512 bytes
Tamanho de setor (lógico/físico): 512 bytes / 512 bytes
Tamanho E/S (mínimo/ótimo): 512 bytes / 512 bytes
Tipo de rótulo do disco: dos
Identificador do disco: 0x0004a750

Dispositivo Inicializar   Início       Fim   Setores Tamanho Id Tipo
/dev/sda1   *                2048 599980031 599977984  286,1G 83 Linux
/dev/sda2               599982080 625141759  25159680     12G 82 Linux swap / Solaris


I didnt get how to use the parameters of the mount command, so i didnt try mount it with that sintaxes...

Head_on_a_Stick:

I think i have the filesystem tools installed, since the OS was working ok before i change the fstab...i dont know if it indicates the system have this package installed...

And about the realtime, even the realtime option wasnt on the line i edited...so thats because i realize put the noatime on the ssd line...

arochester:

I didnt try it...but i guess it will not works...
User avatar
DRAGSTER_TUNER
 
Posts: 25
Joined: 2010-03-28 13:30
Location: Brazil

Re: i edit my fstab and now i lost my system

Postby bw123 » 2018-10-16 01:08

Are you saying that you do not understand how to mount a partition from a terminal?
User avatar
bw123
 
Posts: 3532
Joined: 2011-05-09 06:02
Location: TN_USA

Re: i edit my fstab and now i lost my system

Postby GarryRicketson » 2018-10-16 01:14

I think that is the problem, the OP needs a copy/paste example, based on the info they gave, or they could look at the manual:
Code: Select all
man  mount
I think it explains pretty well.
--some thing like
Code: Select all
# mount /dev/sda1  /mnt

Maybe ? for the options, one really needs to read the manual, and I don't have the Debian manual handy at this moment. The # is not part of the command, it indicates this must be done as root or using sudo.

This seems odd to me:
arochester:

I didnt try it...but i guess it will not works...

Because, how can some one "guess it will not work" if they don't even try?
If the OP can not access or boot the system, they will need to boot with a live CD or Live usb device, so they can access from a terminal. Maybe the OP needs some explanation on that.
I think maybe there is some communication problem as well due to language and the way a machine translator translates, ?
User avatar
GarryRicketson
 
Posts: 5167
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: i edit my fstab and now i lost my system

Postby Head_on_a_Stick » 2018-10-16 04:58

DRAGSTER_TUNER wrote:I think i have the filesystem tools installed

Please post the full output of these two commands:
Code: Select all
apt policy e2fsprogs
wipefs /dev/sdb1
I suffer from depression and may lash out occasionally, try not to take it personally.
User avatar
Head_on_a_Stick
 
Posts: 8180
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: i edit my fstab and now i lost my system

Postby DRAGSTER_TUNER » 2018-10-16 12:43

Code: Select all
apt-cache policy e2fsprogs
e2fsprogs:
  Instaled: 1.43.1-1
  Candidate: 1.43.1-1
  version:
 *** 1.43.1-1 0
        100 /var/lib/dpkg/status


Code: Select all
wipefs /dev/sdb1
offset               type
----------------------------------------------------------------
0x438                ext4   [filesystem]
                     UUID:  5d8607cc-5bbd-4442-ad08-82bcc61c9d72
User avatar
DRAGSTER_TUNER
 
Posts: 25
Joined: 2010-03-28 13:30
Location: Brazil

Re: i edit my fstab and now i lost my system

Postby Segfault » 2018-10-16 14:58

Amazing how a simple trivial task can be made so sophisticated. :shock:

This is what I'd do.
1. Boot from an external media. SysRescueCD is my favorite and always ready in a USB stick.
2. Mount the root filesystem. Make sure it is mounted read-write. If it is ro then investigate why, fix the problem and remount rw.
3. Edit the fstab.

Done!
Segfault
 
Posts: 764
Joined: 2005-09-24 12:24

Re: i edit my fstab and now i lost my system

Postby Head_on_a_Stick » 2018-10-16 17:22

Segfault wrote:Amazing how a simple trivial task can be made so sophisticated

Thanks :mrgreen:

The OP has already tried mounting the partition, that is where the error message I quoted originated.

@OP: try
Code: Select all
# fsck /dev/sdb1

A simple web search of the error message would have told you to try this:

https://unix.stackexchange.com/question ... superblock

See also viewtopic.php?f=30&t=47078
I suffer from depression and may lash out occasionally, try not to take it personally.
User avatar
Head_on_a_Stick
 
Posts: 8180
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: i edit my fstab and now i lost my system

Postby bw123 » 2018-10-16 17:32

still haven't seen the mount command used that caused the error? Looked like some filemanager or fronted was trying to mount /media/superjammer or something?

'system-managed device' sounds like a gnome thing?
User avatar
bw123
 
Posts: 3532
Joined: 2011-05-09 06:02
Location: TN_USA

Re: i edit my fstab and now i lost my system

Postby Segfault » 2018-10-16 20:40

Our OP has been around for 8+ years. One would expect at least some degree of proficiency by now. Not sure what is wrong here, the language barrier perhaps?
Segfault
 
Posts: 764
Joined: 2005-09-24 12:24

Re: i edit my fstab and now i lost my system

Postby DRAGSTER_TUNER » 2018-10-16 23:30

Segfault wrote:Amazing how a simple trivial task can be made so sophisticated. :shock:

This is what I'd do.
1. Boot from an external media. SysRescueCD is my favorite and always ready in a USB stick.
2. Mount the root filesystem. Make sure it is mounted read-write. If it is ro then investigate why, fix the problem and remount rw.
3. Edit the fstab.

Done!


Silly silly silly issue! Just used SysRescueCD and mounted the HD....entered in the /etc/fstab and edited!

Done.

Thanks for everyone whos helped me out!
User avatar
DRAGSTER_TUNER
 
Posts: 25
Joined: 2010-03-28 13:30
Location: Brazil

Re: [SOLVED] i edit my fstab and now i lost my system

Postby Head_on_a_Stick » 2018-10-17 04:56

Can you now chroot into the formerly broken system from the other Debian on the disk?

It seems silly to have to load a live ISO when you already have another distribution bootable from the disk.
I suffer from depression and may lash out occasionally, try not to take it personally.
User avatar
Head_on_a_Stick
 
Posts: 8180
Joined: 2014-06-01 17:46
Location: /dev/chair

Next

Return to System configuration

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable