Re: Where's my disk?

2011-06-04 Thread Polytropon
On Sat, 04 Jun 2011 10:31:18 +0200, Erik Nørgaard norga...@locolomo.org wrote:
 The first problem is that I have no idea how my disk will be recognized, 
 now the root partition is on /dev/ad6s1a.

A good approach is to apply a label or use the UFSID of
the partitions (which don't depend on controller position)
instead of the device names.



 The second problem is that the server is headless. I pretty much have to 
 guess and remember. I have no way of knowing if a command was successful.

Maybe you have the chance to prepare access with a serial
terminal (real one or per terminal emulator)?



 oh, and the third problem is that this new one uses a USB keyboard and I 
 only have a PS2 keyboard.

The kernel will detect it and attach it to the ukbd driver,
together with the kbdmuxer you should be able to just use
it, even if an AT style PS/2 keyboard interface is present
on the system (but without the possibility to connect a
keyboard).





-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Where's my disk?

2011-06-04 Thread Erik Nørgaard

On 4/6/11 10:48 AM, Polytropon wrote:

On Sat, 04 Jun 2011 10:31:18 +0200, Erik Nørgaardnorga...@locolomo.org  wrote:

The first problem is that I have no idea how my disk will be recognized,
now the root partition is on /dev/ad6s1a.


A good approach is to apply a label or use the UFSID of
the partitions (which don't depend on controller position)
instead of the device names.


Thanks, I tried to add labels, and all file systems are labeled, except 
the root file system, it gives an error


alpha# tunefs -L root /dev/ad6s1a
tunefs: /dev/ad6s1a: failed to write superblock

Can I use the fsid in fstab?

alpha# mount -v
/dev/ad6s1a on / (ufs, local, fsid c18a2f44f29adbc0)
devfs on /dev (devfs, local, multilabel, fsid 00ff00060600)
/dev/ufs/local on /usr/local (ufs, local, fsid c58a2f44da5dfaa7)
/dev/ufs/var on /var (ufs, local, fsid c98a2f44462bb250)
/dev/ufs/tmp on /tmp (ufs, local, fsid d38a2f44b88ac8e5)
/dev/ufs/home on /home (ufs, local, fsid d58a2f449675649f)
/dev/ufs/share on /home/share (ufs, local, fsid e28a2f4464800a20)
devfs on /var/named/dev (devfs, local, multilabel, fsid 01ff00060600)

As for the screen I've usually done without, I know my system well, but 
if the disk moves, I'm lost. For the keyboard, maybe a PS2 to USB adapter?


Thanks, Erik
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Where's my disk?

2011-06-04 Thread Polytropon
On Sat, 04 Jun 2011 11:12:28 +0200, Erik Nørgaard norga...@locolomo.org wrote:
 Thanks, I tried to add labels, and all file systems are labeled, except 
 the root file system, it gives an error
 
 alpha# tunefs -L root /dev/ad6s1a
 tunefs: /dev/ad6s1a: failed to write superblock
 
 Can I use the fsid in fstab?
 
 alpha# mount -v
 /dev/ad6s1a on / (ufs, local, fsid c18a2f44f29adbc0)
 devfs on /dev (devfs, local, multilabel, fsid 00ff00060600)
 /dev/ufs/local on /usr/local (ufs, local, fsid c58a2f44da5dfaa7)
 /dev/ufs/var on /var (ufs, local, fsid c98a2f44462bb250)
 /dev/ufs/tmp on /tmp (ufs, local, fsid d38a2f44b88ac8e5)
 /dev/ufs/home on /home (ufs, local, fsid d58a2f449675649f)
 /dev/ufs/share on /home/share (ufs, local, fsid e28a2f4464800a20)
 devfs on /var/named/dev (devfs, local, multilabel, fsid 01ff00060600)

That should work (as the kernel supports this feature or
the corresponding module has been loaded). Maybe you can
check this in the old setting?



 As for the screen I've usually done without, I know my system well, but 
 if the disk moves, I'm lost. For the keyboard, maybe a PS2 to USB adapter?

If you have a USB keyboard, you can directly use that - after
the kernel has come up, the keyboard can be used. PRIOR to
that point, it may needed to enable some kind of USB keyboard
legacy support in the BIOS / CMOS setup.

I'm using a native USB keyboard here (Sun Type 7) which can't
be used until the kernel loads ukbd; for emergency purposes,
I still have to attach a regular PS/2 keyboard to the powerless
system... or use the HIL plug to plug the keyboard cord into
the keyboard - yes, it's an IBM model M. :-)

An adapter from PS/2 to USB (if you don't have a USB, but a
PS/2 keyboard) should also work. I have a cheap one (from
China) here, works very good.

But as I mentioned, it's also possible to make FreeBSD booting
to and accessing from a serial console, no matter if you use
a real serial terminal (e. g. DEC vt100), a laptop with a
serial cable and a terminal program (e. g. cu), or a means
to connect to the serial port that provides telnet access
(such devices are often found in datacenters, and some of
them allow accessing a system's serial console through a
web interface). In the past, I had some headless Sun boxes
(Sparcs and Ultras) that I connected to using a real serial
terminal - fully sufficient, used less than once per year. :-)



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Where's my disk?

2011-06-04 Thread RW
On Sat, 4 Jun 2011 10:48:12 +0200
Polytropon free...@edvax.de wrote:

 On Sat, 04 Jun 2011 10:31:18 +0200, Erik Nørgaard
 norga...@locolomo.org wrote:
  The first problem is that I have no idea how my disk will be
  recognized, now the root partition is on /dev/ad6s1a.
 
 A good approach is to apply a label or use the UFSID of
 the partitions (which don't depend on controller position)
 instead of the device names.

Additionally do a swapoff and use glabel label to label any swap
partitions. Don't forget to update fstab before doing a swapon or
rebooting or you might overwrite the label. 
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Where's my disk?

2011-06-04 Thread Warren Block

On Sat, 4 Jun 2011, Erik Nørgaard wrote:


On 4/6/11 10:48 AM, Polytropon wrote:
On Sat, 04 Jun 2011 10:31:18 +0200, Erik Nørgaardnorga...@locolomo.org 
wrote:

The first problem is that I have no idea how my disk will be recognized,
now the root partition is on /dev/ad6s1a.


A good approach is to apply a label or use the UFSID of
the partitions (which don't depend on controller position)
instead of the device names.


Thanks, I tried to add labels, and all file systems are labeled, except the 
root file system, it gives an error


alpha# tunefs -L root /dev/ad6s1a
tunefs: /dev/ad6s1a: failed to write superblock


The filesystem has to be unmounted or mounted ro to set a label.

http://www.wonkity.com/~wblock/docs/html/labels.html___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org

Re: Where's my disk?

2011-06-04 Thread Erik Nørgaard

On 4/6/11 3:09 PM, Warren Block wrote:

On Sat, 4 Jun 2011, Erik Nørgaard wrote:

Thanks, I tried to add labels, and all file systems are labeled,
except the root file system, it gives an error

alpha# tunefs -L root /dev/ad6s1a
tunefs: /dev/ad6s1a: failed to write superblock


The filesystem has to be unmounted or mounted ro to set a label.


Thanks, but not enough:

alpha# mount -f -o ro /
alpha# mount
/dev/ad6s1a on / (ufs, local, read-only)
devfs on /dev (devfs, local, multilabel)
/dev/ufs/local on /usr/local (ufs, local)
/dev/ufs/var on /var (ufs, local)
/dev/ufs/tmp on /tmp (ufs, local)
/dev/ufs/home on /home (ufs, local)
/dev/ufs/share on /home/share (ufs, local)
devfs on /var/named/dev (devfs, local, multilabel)
alpha# tunefs -L root /dev/ad6s1a
tunefs: /dev/ad6s1a: failed to write superblock

BR, Erik
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Where's my disk?

2011-06-04 Thread claudiu vasadi
Try booting into single user mode and then:

# mount -u /
# tunefs -L root /dev/ad6s1a
# reboot
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Where's my disk?

2011-06-04 Thread Warren Block

On Sat, 4 Jun 2011, claudiu vasadi wrote:


Try booting into single user mode and then:

# mount -u /
# tunefs -L root /dev/ad6s1a
# reboot


Single user yes, but don't remount the filesystem.  Just label it and 
reboot.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org