DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 27th May 2008
Sunsawe Sunsawe is offline
Port Guard
 
Join Date: May 2008
Posts: 39
Thanked 0 Times in 0 Posts
Unhappy what to do at mountroot prompt?

Hi everyone,

Just coming from bsdforums... sad...
But life is going on and I hope I'll find some help here.
So this is my problem.

After wrong diagnose, my FreeBSD 7 box has been brutally rebooted. Since, it is not booting anymore and instead, prompting this ( horrible ) mountroot.

I tried to find what to do there and all I found was to indicate the / slice. What i did, like this:

usf:/dev/ad1s1a

but it just replied something like 'No such file or directory' several times until the box has been stopped.

From another FreeBSD system (multiboot on the box) I applied "fsck -y" on all slices of the first system to get them all clean. Then I tried again. the result was sadly the same.

So... the question is simple... what to do?

Thanks
Reply With Quote
  #2   (View Single Post)  
Old 28th May 2008
davidgurvich davidgurvich is offline
Fdisk Soldier
 
Join Date: May 2008
Location: NYC
Posts: 57
Thanked 3 Times in 3 Posts
Default

Try using the tools available at mountroot. I think lsdev lists what drives are detected and '?' gives a list of commands.
Reply With Quote
  #3   (View Single Post)  
Old 28th May 2008
roddierod's Avatar
roddierod roddierod is offline
Real Name: Rod Person
VPN Cryptographer
 
Join Date: Apr 2008
Location: Pittsburgh, Pa
Posts: 372
Thanked 13 Times in 13 Posts
Default

Quote:
Originally Posted by Sunsawe View Post
I tried to find what to do there and all I found was to indicate the / slice. What i did, like this:

usf:/dev/ad1s1a
My memory is getting old, I just did this last week. But it should be ufs:ad1s1a
I pretty sure you don't need the dev part, and it UFS not USF - either way that part is wrong.
__________________
"The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use the words." -Philip K. Dick
Reply With Quote
  #4   (View Single Post)  
Old 28th May 2008
Sunsawe Sunsawe is offline
Port Guard
 
Join Date: May 2008
Posts: 39
Thanked 0 Times in 0 Posts
Default

Sorry, i just wrote it wrong but i really tried ufs and not usf.

I am going to try all your advices but tomorrow, when i'll get my hands on the box.
About that, i am wondering... Isn't it a way to fix that from another freebsd system? If i can mount all the slices of my non-booting one, is there a file that i can set to fix that?
Reply With Quote
  #5   (View Single Post)  
Old 28th May 2008
TerryP's Avatar
TerryP TerryP is offline
Arp Constable
 
Join Date: May 2008
Location: USofA
Posts: 1,547
Thanked 112 Times in 104 Posts
Default

You could always boot off a FreeBSD live cd, mount your systems root / and access files read+write.


Every time I've seen that prompt, either I screwed up /etc/fstab or when using SATA drives, changing the ATA_STATIC_ID option in the kernel configuration without adjusting fstab.
__________________
My Journal

Thou shalt check the array bounds of all strings (indeed, all arrays), for surely where thou typest ``foo'' someone someday shall type ``supercalifragilisticexpialidocious''.

Last edited by TerryP; 28th May 2008 at 10:56 PM.
Reply With Quote
  #6   (View Single Post)  
Old 29th May 2008
Sunsawe Sunsawe is offline
Port Guard
 
Join Date: May 2008
Posts: 39
Thanked 0 Times in 0 Posts
Default

I mounted the slice / and checked the fstab and it seems ok.
So if i want to fix this boot issue, which file else shall I check?
Reply With Quote
  #7   (View Single Post)  
Old 29th May 2008
harisman's Avatar
harisman harisman is offline
Fdisk Soldier
 
Join Date: May 2008
Location: Hellas (Greece)
Posts: 66
Thanked 5 Times in 4 Posts
Default

First please post us your /etc/fstab.

If the kernel finished loading, and fsck reports that the filesystem is consistent, then maybe the init or similar needed files might be corrupted.
A quick solution is to use the FIXIT option from the installation media to repair the base system.

Last edited by harisman; 29th May 2008 at 03:22 PM.
Reply With Quote
  #8   (View Single Post)  
Old 31st May 2008
Sunsawe Sunsawe is offline
Port Guard
 
Join Date: May 2008
Posts: 39
Thanked 0 Times in 0 Posts
Default

Hi again!
So i tried the ? at the mountroot prompt. It listed all the available slices and ad1s1a was in between. I then typed:

Quote:
ufs:ad1s1a
After displaying a couple of things, it asked me for the fullpath of the shell or to accept the default one. I accepted and tried a 'fsck -y' command.
It replied that it couldn't find the file

Quote:
fstab: /etc/fstab:0: no such file or directory
and this is the fstab, that I got from mountint ad1s1a from another FreeBSD system:

Quote:
# Device Mountpoint FStype Options Dump Pass#
/dev/ad1s1b none swap sw 0 0
/dev/ad1s1a / ufs rw 1 1
/dev/ad1s2d /config ufs rw 2 2
/dev/ad1s1d /tmp ufs rw 2 2
/dev/ad1s1f /usr ufs rw 2 2
/dev/ad1s1e /var ufs rw 2 2
/dev/acd0 /cdrom cd9660 ro,noauto 0 0
/dev/amrd0s1 /mnt/dir1 ext2fs rw,noauto 0 0
/dev/amrd0s3 /mnt/dir2 ext2fs rw,noauto 0 0
/dev/amrd0s2 /mnt/dir3 ext2fs rw,noauto 0 0
/dev/amrd0s4 /mnt/dir4 ext2fs rw,noauto 0 0
so... what's wrong?

Last edited by Sunsawe; 31st May 2008 at 08:42 AM.
Reply With Quote
  #9   (View Single Post)  
Old 31st May 2008
roddierod's Avatar
roddierod roddierod is offline
Real Name: Rod Person
VPN Cryptographer
 
Join Date: Apr 2008
Location: Pittsburgh, Pa
Posts: 372
Thanked 13 Times in 13 Posts
Default

Quote:
Originally Posted by Sunsawe View Post
It replied that it couldn't find the file

and this is the fstab, that I got from mountint ad1s1a from another FreeBSD system:

so... what's wrong?
Well the first things is, is the file /etc/fstab actually on the machine that you are booting? If not, then that's your problem.
__________________
"The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use the words." -Philip K. Dick
Reply With Quote
Old 31st May 2008
Sunsawe Sunsawe is offline
Port Guard
 
Join Date: May 2008
Posts: 39
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by roddierod View Post
Well the first things is, is the file /etc/fstab actually on the machine that you are booting? If not, then that's your problem.
Well yes. it is the same machine with 2 systems installed in multiboot. I just mounted the ad1s1a slice from the other system and found the fstab where it was supposed to be, meaning in /etc directory in the mounted slice.
Reply With Quote
Old 1st June 2008
robbak's Avatar
robbak robbak is offline
Real Name: Robert Backhaus
VPN Cryptographer
 
Join Date: May 2008
Location: North Queensland, Australia
Posts: 366
Thanked 40 Times in 39 Posts
Default

Please use [code][/code], not [quote][/quote] when showing file listings, to preserve white space. It makes things like fstab much easier to parse.

I think that that line is stating that it cannot find the dev file listed on line 0 of the fstab file, not that it cannot find the file. Could you check whether all the device nodes not listed as 'noauto' actually exist (when you enter single-user mode)?

Generally, you specify a device node or mount point for a filesystem. Like this # fsck -y /dev/ad1s1a
__________________
The only dumb question is a question not asked.
The only dumb answer is an answer not given.
Reply With Quote
Old 1st June 2008
roddierod's Avatar
roddierod roddierod is offline
Real Name: Rod Person
VPN Cryptographer
 
Join Date: Apr 2008
Location: Pittsburgh, Pa
Posts: 372
Thanked 13 Times in 13 Posts
Default

Quote:
Originally Posted by Sunsawe View Post
Well yes. it is the same machine with 2 systems installed in multiboot. I just mounted the ad1s1a slice from the other system and found the fstab where it was supposed to be, meaning in /etc directory in the mounted slice.
I was trying to figure out why you where showing us an /etc/fstab for "another system" that worked. That isn't going to help fix the one that isn't working if we can't see that.

I'd suggest booting the system with a rescue cd so that you can mount the partition and look at the /etc/fstab that doesn't work.
__________________
"The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use the words." -Philip K. Dick
Reply With Quote
Old 1st June 2008
Sunsawe Sunsawe is offline
Port Guard
 
Join Date: May 2008
Posts: 39
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by roddierod View Post
I was trying to figure out why you where showing us an /etc/fstab for "another system" that worked. That isn't going to help fix the one that isn't working if we can't see that.

I'd suggest booting the system with a rescue cd so that you can mount the partition and look at the /etc/fstab that doesn't work.
well.. even with a mistake in the line, if you look carefully, you'll see that I am showing the fstab which is not working, that I got by mounting the slice in another FreeBSD system, which is working.

So this is the non working fstab.

Quote:
Originally Posted by robbak View Post
Please use [code][/code], not when showing file listings, to preserve white space. It makes things like fstab much easier to parse.

I think that that line is stating that it cannot find the dev file listed on line 0 of the fstab file, not that it cannot find the file. Could you check whether all the device nodes not listed as 'noauto' actually exist (when you enter single-user mode)?

Generally, you specify a device node or mount point for a filesystem. Like this # fsck -y /dev/ad1s1a
Sorry for the code tag...

I check with the ? at the mountroot and they all exist.
Reply With Quote
Old 5th June 2008
radcapricorn radcapricorn is offline
Port Guard
 
Join Date: Jun 2008
Posts: 15
Thanked 0 Times in 0 Posts
Default

Does 'mount' command after you get to the shell (the /bin/sh by default) show devfs mounted?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Nicer Prompt with ksh on 5.0 nihonto NetBSD Installation and Upgrading 8 12th October 2009 08:49 PM
changing custom prompt ksh for root. bsdnewbie999 OpenBSD General 7 1st April 2009 04:53 AM
Exec command in zsh prompt? bsddaemon General software and network 2 18th October 2008 09:37 PM


All times are GMT. The time now is 02:11 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick