# Now here's a noob in a quandry messed up xorg.conf and no login promt to fix it.



## Neuralman (Sep 27, 2011)

See here's the thing.

Got a bit carried away editing my xorg.conf (although I did make a backup, xorgold.conf, just in case. So what happens now is that my system was booting directly into KDE. Since the changes I now just get a black screen. So the obvious thing to do is to restore the old xorg.conf, right? But I can't get any sort of login prompt now.

So I thought I'd try to hop in via Fixit mode but I'm obviously too much of a noob to figure out how to mount my HDD filesystem (ad5) in a writeable manner so I can restore the old version of the file.

So my best case scenario is to find some sort of keyboard-combo that will simply stop KDE from trying to load and leave me with a nice login prompt - from there I can quite happily restore the old file from the command-line. Failing that the next best thing would be for someone to advise me what commands I'd need to type from within Fixit mode to be able to mount my HDD for writing and then delete my current xorg.conf and replace it with the older version.

Any help greatly appreciated.


----------



## wblock@ (Sep 27, 2011)

When it shows a black screen, press ctrl-alt-f2.  It should give you a text console for login.

If that doesn't work, choose single-user mode from the boot menu and mount -a.


----------



## Neuralman (Sep 27, 2011)

Hi wblock,

Thanks for the assistance. I tried the ctrl-alt-f2 method and I get a brief flicker on my monitor, then it simply goes black again. When I choose single-user from the boot menu the system just hangs after detecting the keyboard. So I booted from the install DVD and tried the following from Fixit mode using the DVD live filesystem ...

`Fixit# mkdir /disk1`
`Fixit# mount /dev/ad5s1a /disk1`

And the response comes as


```
mount: /dev/ad5s1a : Operation not permitted.
```

Any other idea would be most welcome.


----------



## OH (Sep 27, 2011)

Fixit probably doesn't want to mount ad5s1a because it is not clean (shutdown incorrectly). You should fsck() the partition before trying to mount it.

Alternatively, if you can still boot to the blank screen, try Ctrl-Alt-Backspace to force X to shutdown


----------



## Neuralman (Sep 27, 2011)

Hi OH,

I tried 

`Fixit# fsck -y /dev/ad5s1a`

I received this response:

```
fstab : /etc/fstab:0: No such file or directory
fstab : /etc/fstab:0: No such file or directory
fsck : Could not determine filesystem type
```


----------



## Neuralman (Sep 27, 2011)

Little update.

tried

`Fixit# fsck -t ufs /dev/a5s1a`

Recieved 
	
	



```
******FILE SYSTEM IS CLEAN**********
```

Then used

`mount -rw /dev/ad5s1 /disk1`

Which mounted the drive succesfully. After that it was easy. restored the old xorg.conf and all is well. Thanks so much for the assistance.


----------

