On Fri, Aug 27, 2010 at 05:04:57PM +0200, Paul de Weerd wrote:
> On Fri, Aug 27, 2010 at 08:38:57PM +0800, Marcus wrote:
> | how to fix fstab in single user mode for bootable "Live" USB drive
> | 
> | http://www.openbsd.org/faq/faq14.html#flashmemLive
> | says:
> | If your target machine has an ahci(4) or SCSI interface, you will
> | probably find your USB drive's identifier changing. Having multiple
> | versions of your /etc/fstab file may make this easier to "fix" (in
> | single user mode).
> | 
> | Install OpenBSD to USB drive in a notbook.   the usb drive is
> | recognized as "sd1"
> | 
> | Now put the USB drive into another PC an boot from USB. the usb dirve
> | is recognized as "sd0".
> | 
> | in the single user mode.
> | "fsck -p / && mount -uw /"   not work
> | "fsck -p /usr && mount /usr" not work
> | "vi /etc/fstab" not work.
> | 
> | question:
> | how to mount root / writable and active vi editor?
> 
> Don't. There's no need. Here's how you do it even easier (requires
> recent snap / source)
> 
> [ -f /dev/diskmap ] || ( cd /dev; sudo MAKEDEV diskmap ) 
> echo wq | disklabel -E YOURDISK
> UID=`disklabel YOURDISK | grep ^uid: | cut -f2 -d' '`
> { echo ",s#/dev/YOURDISK#${UID}.#"; echo w; } | ed - /etc/fstab
> 
> Do not try this until you understand what it does.  You'll have to
> edit it to your needs anyway.
> 
> This new uid stuff is really cool, thanks jsing@ !
> 
> Paul 'WEiRD' de Weerd
> 
> -- 
> >++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+
> +++++++++++>-]<.>++[<------------>-]<+.--------------.[-]
>                  http://www.weirdnet.nl/                 

This is the correct answer. I have a USB stick I install/upgrade
to. I boot from it on systems where it appears as sd0, sd1, sd3,
sd4. Works perfectly.

All hail jsing!

..... Ken

Reply via email to