Re: add a new partition in USB ( clone )

2014-07-25 Thread Tuyosi Takesima
Hi, all .
this is a method to make  clone USB larger size than original .


1) use linux (because openbsd fdisk is hard to use)
by fdisk , make /dev/sdb4  Id:a6

2)then use  'openbsd5.5 install CD disk' for installboot
on  installing   OpenBSD
use  OpenBSD area  - 1)
mount point /  (because original USB has a and b only)
install  bsd,  bsd.rd,   base55 only

3)then openbsd runninng machine,

# mkdir /mnt0
# mkdir /mnt1

# mount /dev/sd0a /mnt0  - / partition
# mount /dev/sd1a /mnt   - / partition

# (cd /mnt0; tar cvpf - .)|(cd /mnt1 ; tar xpf -)
#umount /mnt0 = cannot
#umount /mnt1 = cannot

so halt openbsd machine ,

4)then goto linux machine

fdisk /dev/sdb

  make bootable flag on sdb4

  ( if 1) has this priicedure , this may be needless )

---
this method is perhaps effective to smaller USB clone , or
USB to Hard disk clone and so so .

---
tuyosi



add a new partition in USB

2014-07-22 Thread Tuyosi Takesima
Hi all .

i have 32GB USB memory . and this is clone of ' 2GB live USB '.
so i want to extend 'this clone 2GB' to about 8GB .
in order to this , i want to make  ' partion d ' in 32GB USB .
so i do next steps .

# fdisk -e sd0
fdisk: 1 edit 0
Partition id ('0' to disable) [0 - FF]: [0] (? for help) 1
fdisk: 1 setpid 0
Partition id ('0' to disable) [0 - FF]: [1] (? for help) A6
fdisk:*1 w
fdisk: MBR contains more than one OpenBSD partition!  --- attention
Write MBR anyway? [n] y

now
# fdisk -e sd0
fdisk: 1 p
Disk: sd0   geometry: 3840/255/63 [61702144 Sectors]
Offset: 0   Signature: 0xAA55
Starting Ending LBA Info:
 #: id  C   H   S -  C   H   S [   start:size ]
---
 0: A6243   0   1 -   1000   0   1 [ 3903795:12161206 ] OpenBSD
 1: 00  0   0   0 -  0   0   0 [   0:   0 ] unused
 2: 00  0   0   0 -  0   0   0 [   0:   0 ] unused
*3: A6  0   1   2 -242 254  63 [  64: 3903731 ] OpenBSD


i want to make partition d in
'  #0  243   0   1 -   1000   0   1 OpenBSD ' .


--
i try
# disklabel -E sd0
 p
OpenBSD area: 3903795-16065001; size: 12161206; free: 12161206
#size   offset  fstype [fsize bsize  cpg]
  c: 617021440  unused


this is strange to me because i already had a
 in ' #3: A6  0   1   2 -242 254  63  OpenBSD '.
 but thre is no ' partition a '

what should i do next to make ' partion d' in 32GB USB ?
and where is ' partition a ' ?


tuyosi



Re: add a new partition in USB

2014-07-22 Thread Nick Holland
On 07/22/14 19:09, Tuyosi Takesima wrote:
 Hi all .
 
 i have 32GB USB memory . and this is clone of ' 2GB live USB '.
 so i want to extend 'this clone 2GB' to about 8GB .
 in order to this , i want to make  ' partion d ' in 32GB USB .
 so i do next steps .
 
 # fdisk -e sd0
...
no no no.

You need to read http://www.openbsd.org/faq/faq14.html
and read what is actually there, not what you think is there.

You can only have one OpenBSD fdisk partition...and the answers to your
questions are in the above link.

Nick.



Re: add a new partition in USB

2014-07-22 Thread Tuyosi Takesima
Hi, all.

till iread Nick's reply , i make clone 32GB USB from 2GB USB by dd.
and am  making new partition on 32G USB .
but fail ,fail ,

from now i change strategy .
erase 32GB USB completely , and make a partition ,and copy files
from 2GB to 32GB .

2G USB is recognized as sd0 by amd64 openbsd machine.
32G USB is sd1 .

disklabel  -E sd1
d *
A
and erese k etc .
(i can't make big size a partition directly .
 some technique is needed )

result is next .

 p
OpenBSD area: 0-61702144; size: 61702144; free: 51692144
#size   offset  fstype [fsize bsize  cpg]
  a: 1000 39486816  4.2BSD   2048 163841
  b:10swap
  c: 617021440  unused
 q


# mkdir /mnt0
# mkdir /mnt1

# newfs sd1a

# mount /dev/sd0a /mnt0
# mount /dev/sd1a /mnt1

# cp -r /mnt0/* /mnt1
 or
 (cd /mnt0; tar cvpf - .)|(cd /mnt1 ; tar xpf -)
the latter  may be much  faster .

regretably ,
# cd /usr/mdec; ./installboot /mnt1/boot biosboot sd1
ksh: ./installboot: not found
FAIL


# /usr/sbin/installboot /mnt1/boot  /usr/mdec/biosboot sd1
installboot: disklabel: /mnt1/boot: Inappropriate ioctl for device
also FAIL .

pehaps
umount /mnt0
umount /mnt1
continue .

what is ' appropriate ioctl for device ' ?
---
tuyosi