DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

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

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 1st January 2013
ershiba ershiba is offline
Loading, please wait...
 
Join Date: Dec 2012
Posts: 34
Default what to do when motherboard gone and you want to access file partitions

hi all bsd members,

what methods should get deployed when having problem under such situation?

eg, can't boot, motherboard broke,

detach the OpenBSD hard disk and attach it to another Windows OS pc, (assume we only got windows pc available)

just want to copy/backup the file partitions "/home" or other relevant file partitions.

could we use live cd to copy & transfer. ( is there any OpenBSD live cd that available for download? )

what should we do under such situation? please share, thank you.
Reply With Quote
  #2   (View Single Post)  
Old 1st January 2013
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,318
Default

  1. Quote:
    Originally Posted by ershiba View Post
    detach the OpenBSD hard disk and attach it to another Windows OS pc, (assume we only got windows pc available)
    Correct.

  2. Quote:
    could we use live cd to copy & transfer. ( is there any OpenBSD live cd that available for download? )
    If the Windows system supports booting from USB, simply install OpenBSD to a USB flash drive, & boot from it. Note that images of live CD's are not officially supported by the project, however a member here, jggimi, makes such images available. See the "About Me" tab at the link above for further information.

  3. Quote:
    just want to copy/backup the file partitions "/home" or other relevant file partitions.
    To preserve permissions & ownership, look at dump(8) & restore(8). If permission & ownership information is not important, then cp(1) is an alternative.

Last edited by ocicat; 1st January 2013 at 01:18 PM. Reason: Clarify.
Reply With Quote
  #3   (View Single Post)  
Old 1st January 2013
shep shep is offline
Real Name: Scott
Arp Constable
 
Join Date: May 2008
Location: Dry and Dusty
Posts: 1,503
Default

Other options: Provided the OpenBSD disk is hardware compatible with the Windows PC (Not an AMD64 OpenBSD disk in an i386 Windows PC) you should be able boot the OpenBSD disk directly.
Then you could use tar(1) to archive/compress the files on the OpenBSD disk and then write them to a CD or USB drive.
Or you can edit /etc/inetd.conf to allow ftp transfers and
Code:
/etc/rc.d/inetd restart
which turns the machine running the OpenBSD disk into an ftp server. Then ftp into the new server and copy the needed files.
Reply With Quote
  #4   (View Single Post)  
Old 2nd January 2013
ershiba ershiba is offline
Loading, please wait...
 
Join Date: Dec 2012
Posts: 34
Default

@ocicat,
thanks for the replied, i downloaded jggimi live OpenBSD iso, but find no luck to test and boot it inside VirtualBox, maybe i need try a little bit more =)

btw, is there any specific concerns when mounting those file partitions?
in linux, windows or must use OpenBSD only to mount it to prevent possible issues arise?


@shep,
thanks for the tips, =)
Reply With Quote
  #5   (View Single Post)  
Old 2nd January 2013
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,128
Default

You don't need to test and boot inside Virtual Box. Just like any other live cd you can run it from the CD itself.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
  #6   (View Single Post)  
Old 2nd January 2013
ershiba ershiba is offline
Loading, please wait...
 
Join Date: Dec 2012
Posts: 34
Default

Quote:
Originally Posted by J65nko View Post
You don't need to test and boot inside Virtual Box. Just like any other live cd you can run it from the CD itself.
thanks J65nko, i am aware of that,
actually, i tried to create some possible situations and test & solve it using 1 laptop ;~) easier.

and don't have to burn unnecessary dvd as virtualbox allow us to select the iso file and boot it.
Reply With Quote
  #7   (View Single Post)  
Old 2nd January 2013
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

I just replied to a PM from ershiba regarding Virtualbox; I had not seen this thread and did not have the context. I pointed him to the documented VT-x hardware requirement for OpenBSD guests in Virtualbox, and recommended alternate VM software amid other solutions.
Reply With Quote
  #8   (View Single Post)  
Old 2nd January 2013
ershiba ershiba is offline
Loading, please wait...
 
Join Date: Dec 2012
Posts: 34
Default boot OpenBSD iso in VirtualBox

oh yeah, the evil manufacturer love to disable our on/off VT-x setting in bios, damn!

workaround as follow, from Siddi via jggimi pm,
https://www.virtualbox.org/ticket/639

Code:
C:\Program Files\Oracle\VirtualBox>VBoxManage.exe list vms
"OpenBSD" {afadb990-f7d2-47b9-8f0e-180756fb62b8}

C:\Program Files\Oracle\VirtualBox>VBoxSDL.exe -norawr0 -vm afadb990-f7d2-47b9-8f0e-180756fb62b8
i posted here because i think, it is still relevant to this topic, imo,
Reply With Quote
  #9   (View Single Post)  
Old 2nd January 2013
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

One last point on VirtualBox; it has (in the past) returned faulty register values causing bugs to appear in OpenBSD guests ... I don't recall seeing any reparations published for the particular flaw cited in the misc@ thread below. ershiba and other Virtualbox users should keep it in mind if operational errors occur in VB guests:

http://marc.info/?l=openbsd-misc&m=120492689515501&w=2

Last edited by jggimi; 2nd January 2013 at 08:06 PM. Reason: clarity
Reply With Quote
Old 3rd January 2013
comet--berkeley comet--berkeley is offline
Real Name: Richard
Package Pilot
 
Join Date: Apr 2009
Location: California
Posts: 163
Default

Quote:
Originally Posted by ershiba View Post
btw, is there any specific concerns when mounting those file partitions?
in linux, windows or must use OpenBSD only to mount it to prevent possible issues arise?
@shep,
thanks for the tips, =)
With LInux I find that I can read the OpenBSD partitions.

The Linux 3.7.1 'dmesg' reveals all:

sdb1: <openbsd: sdb10 sdb11 sdb12bad subpartition - ignored

Here I have the "/" partition on sdb10, swap on sdb11 and another data partition on sdb12.
(the bad "subpartition message" is for partition sdb11, the OpenBSD swap partition)

So I can mount sdb10 and sdb12 using the following /etc/fstab entries:

/dev/sdb10 /b10 ufs ufstype=44bsd,noauto,ro 0 0
/dev/sdb12 /b12 ufs ufstype=44bsd,noauto,ro 0 0

and then

mount /b10
mount /b12
Reply With Quote
Old 4th January 2013
ershiba ershiba is offline
Loading, please wait...
 
Join Date: Dec 2012
Posts: 34
Default

Quote:
Originally Posted by comet--berkeley View Post
With LInux I find that I can read the OpenBSD partitions.

The Linux 3.7.1 'dmesg' reveals all:

sdb1: <openbsd: sdb10 sdb11 sdb12bad subpartition - ignored

Here I have the "/" partition on sdb10, swap on sdb11 and another data partition on sdb12.
(the bad "subpartition message" is for partition sdb11, the OpenBSD swap partition)

So I can mount sdb10 and sdb12 using the following /etc/fstab entries:

/dev/sdb10 /b10 ufs ufstype=44bsd,noauto,ro 0 0
/dev/sdb12 /b12 ufs ufstype=44bsd,noauto,ro 0 0

and then

mount /b10
mount /b12
wow, this is great tips!
thanks a lot to you, comet--berkeley

i successfully mount ro openbsd /home using slax linux ( kinda blasphemy ) that is 200MB iso to save your day
Reply With Quote
Old 4th January 2013
ershiba ershiba is offline
Loading, please wait...
 
Join Date: Dec 2012
Posts: 34
Default

ok, another question related to this topic,

using VirtualBox as an example, i change the storage controller from IDE (wd0) to SCSI (sd0)

and no doubt, i can't boot into OpenBSD, because the /etc/fstab try to mount device (wd0) which no longer exists,

i suppose my "make it works" strategy is rewrite /etc/fstab, change wd to sd

are there concerns issues when writing to OpenBSD file partitions?
what is your best way to save a day when having such issue?

ps: i suppose attaching an IDE hard disk into bios SATA/SCSI mode or IDE via USB cable would cause such issue.
Reply With Quote
Old 4th January 2013
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 4,128
Default

The best way is to do an plain OpenBSD install to an USB stick and use that stick to boot the machine.

Then you can read the OpenBSD partition whether it is then called sd[0-9] or wd[0-9]. Simple isn't it?
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump
Reply With Quote
Old 4th January 2013
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Current best practice is to use DUIDs in fstab entries rather than drive numbers.
Reply With Quote
Old 4th January 2013
ershiba ershiba is offline
Loading, please wait...
 
Join Date: Dec 2012
Posts: 34
Default

Quote:
Originally Posted by J65nko View Post
The best way is to do an plain OpenBSD install to an USB stick and use that stick to boot the machine.

Then you can read the OpenBSD partition whether it is then called sd[0-9] or wd[0-9]. Simple isn't it?
ok, i try to do this, thanks for this advice! much appreciate

Quote:
Originally Posted by jggimi View Post
Current best practice is to use DUIDs in fstab entries rather than drive numbers.
ok, no problem, i try to do a new VirtualBox OpenBSD install using DUID when it prompts,
i was understand that DUID is more useful when dealing with lots of hard disks, to prevent misidentifying afaik,
Reply With Quote
Old 4th January 2013
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

DUIDs also help when moving between sd and wd devices.
Reply With Quote
Old 4th January 2013
ershiba ershiba is offline
Loading, please wait...
 
Join Date: Dec 2012
Posts: 34
Default

Quote:
Originally Posted by jggimi View Post
DUIDs also help when moving between sd and wd devices.
ic, thanks jggimi,
glad you mentioned this, gonna try it with changing storage controller
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
Motherboard advice wanted... Vetus General Hardware 6 4th April 2011 08:59 PM
PHP read file contents - Maximum file size cksraj Programming 1 21st September 2009 11:38 AM
Mini-ITX motherboard suggestions twisted_steel General Hardware 28 18th August 2008 09:32 PM
Remote Access to File Server Oko OpenBSD Security 7 23rd June 2008 05:17 PM
Swfdec read-only file access vulnerability corey_james FreeBSD Ports and Packages 0 14th May 2008 11:31 PM


All times are GMT. The time now is 05:46 PM.


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