Cannot mount install.fs disk image to create custom auto_install.conf based USB flash drive

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Cannot mount install.fs disk image to create custom auto_install.conf based USB flash drive

Andy Lemin-2
Hi list,
I really need some help mounting an install.fs disk image, and hope someone
can help :)
I have been trying and failing to create an auto-installing USB flash drive
for OpenBSD.

All of the below steps are being performed using an existing OpenBSD VM

1) Create /auto_install.conf file
https://man.openbsd.org/autoinstall
http://eradman.com/posts/autoinstall-openbsd.html
- Done

2) Install 'upobsd' package
pkg_add -i upobsd
- Done

3) Inject newly created 'auto_install.conf' into a local 'bsd.rd' RAM disk
upobsd -u /auto_install.conf -o /tmp/bsd.rd
- Done

4) Add updated 'bsd.rd' file into 'install.fs'
4a) Associate image with a vnd device so disk image can be mounted as a
filesystem image
vnconfig vnd1 /home/sysadmin/install64.fs
- Done

4b) Mount new vnd1c device (this is where I'm stuck)

****** Here is where I get lost. All the guides refer only to using
install.iso (whos 'a:' and 'c:' partitions are ISO9660 filetypes - for CD
based installs), but I need to use the install.fs (for USB based installs)
******

fw1# mount /dev/vnd1c /mnt
mount_ffs: /dev/vnd1c on /mnt: Invalid argument
fw1# mount -t cd9660 /dev/vnd1c /mnt
mount_cd9660: /dev/vnd1c on /mnt: Invalid argument
fw1# mount -t msdos /dev/vnd1c /mnt
mount_msdos: /dev/vnd1c on /mnt: not an MSDOS filesystem
fw1# mount -t ext2fs /dev/vnd1c /mnt
mount_ext2fs: /dev/vnd1c on /mnt: Input/output error

As you can see, none of the the types I know about are working?

bsd1# disklabel vnd1
# /dev/rvnd1c:
type: vnd
disk: vnd device
label: fictitious
duid: e5445c1e269855f0
flags:
bytes/sector: 512
sectors/track: 100
tracks/cylinder: 1
sectors/cylinder: 100
cylinders: 7382
total sectors: 738240
boundstart: 1024
boundend: 737280
drivedata: 0
16 partitions:
#                size           offset  fstype [fsize bsize   cpg]
  a:           736256             1024  4.2BSD   2048 16384 16142
  c:           738240                0  unused
  i:              960               64   MSDOS

I cannot work out what the filesystem should be? It shows as 'unused' here.

NB; If I try with the 'install.iso' disk image the vnd mount works fine
(with '-t cd9660').
But I need this to work for a flash drive?



Assuming I could get past this, I think I would then need to do the
following;

4c) Copy in bsd.rd
cp /tmp/bsd.rd /mnt/

4d) Unmount /mnt
umount /mnt

4e) Disassociate vnd1
vnconfig -u /dev/vnd1

6) copy modified install.fs image to USB flash..
dd if=install*.fs of=/dev/rsd6c bs=1m

Thanks in advance for your time and help.
Andy.
Reply | Threaded
Open this post in threaded view
|

Re: Cannot mount install.fs disk image to create custom auto_install.conf based USB flash drive

OpenBSD lists
On 11/11/2018 1:28 PM, Andrew Lemin wrote:

> Hi list,
> I really need some help mounting an install.fs disk image, and hope someone
> can help :)
> I have been trying and failing to create an auto-installing USB flash drive
> for OpenBSD.
>
> All of the below steps are being performed using an existing OpenBSD VM
>
> 1) Create /auto_install.conf file
> https://man.openbsd.org/autoinstall
> http://eradman.com/posts/autoinstall-openbsd.html
> - Done
>
> 2) Install 'upobsd' package
> pkg_add -i upobsd
> - Done
>
> 3) Inject newly created 'auto_install.conf' into a local 'bsd.rd' RAM disk
> upobsd -u /auto_install.conf -o /tmp/bsd.rd
> - Done
>
> 4) Add updated 'bsd.rd' file into 'install.fs'
> 4a) Associate image with a vnd device so disk image can be mounted as a
> filesystem image
> vnconfig vnd1 /home/sysadmin/install64.fs
> - Done
>
> 4b) Mount new vnd1c device (this is where I'm stuck)
>
> ****** Here is where I get lost. All the guides refer only to using
> install.iso (whos 'a:' and 'c:' partitions are ISO9660 filetypes - for CD
> based installs), but I need to use the install.fs (for USB based installs)
> ******
>
> fw1# mount /dev/vnd1c /mnt
> mount_ffs: /dev/vnd1c on /mnt: Invalid argument
> fw1# mount -t cd9660 /dev/vnd1c /mnt
> mount_cd9660: /dev/vnd1c on /mnt: Invalid argument
> fw1# mount -t msdos /dev/vnd1c /mnt
> mount_msdos: /dev/vnd1c on /mnt: not an MSDOS filesystem
> fw1# mount -t ext2fs /dev/vnd1c /mnt
> mount_ext2fs: /dev/vnd1c on /mnt: Input/output error
>
> As you can see, none of the the types I know about are working?
>
> bsd1# disklabel vnd1
> # /dev/rvnd1c:
> type: vnd
> disk: vnd device
> label: fictitious
> duid: e5445c1e269855f0
> flags:
> bytes/sector: 512
> sectors/track: 100
> tracks/cylinder: 1
> sectors/cylinder: 100
> cylinders: 7382
> total sectors: 738240
> boundstart: 1024
> boundend: 737280
> drivedata: 0
> 16 partitions:
> #                size           offset  fstype [fsize bsize   cpg]
>    a:           736256             1024  4.2BSD   2048 16384 16142
>    c:           738240                0  unused
>    i:              960               64   MSDOS
>
> I cannot work out what the filesystem should be? It shows as 'unused' here.
>
> NB; If I try with the 'install.iso' disk image the vnd mount works fine
> (with '-t cd9660').
> But I need this to work for a flash drive?
>
>
>
> Assuming I could get past this, I think I would then need to do the
> following;
>
> 4c) Copy in bsd.rd
> cp /tmp/bsd.rd /mnt/
>
> 4d) Unmount /mnt
> umount /mnt
>
> 4e) Disassociate vnd1
> vnconfig -u /dev/vnd1
>
> 6) copy modified install.fs image to USB flash..
> dd if=install*.fs of=/dev/rsd6c bs=1m
>
> Thanks in advance for your time and help.
> Andy.
>

Use the 'a' partition, not 'c'.

Reply | Threaded
Open this post in threaded view
|

Re: Cannot mount install.fs disk image to create custom auto_install.conf based USB flash drive

trondd-2
In reply to this post by Andy Lemin-2
On Sun, November 11, 2018 4:28 pm, Andrew Lemin wrote:

>
> 4b) Mount new vnd1c device (this is where I'm stuck)
>
> ****** Here is where I get lost. All the guides refer only to using
> install.iso (whos 'a:' and 'c:' partitions are ISO9660 filetypes - for CD
> based installs), but I need to use the install.fs (for USB based installs)
> ******
>
> fw1# mount /dev/vnd1c /mnt
> mount_ffs: /dev/vnd1c on /mnt: Invalid argument
> fw1# mount -t cd9660 /dev/vnd1c /mnt
> mount_cd9660: /dev/vnd1c on /mnt: Invalid argument
> fw1# mount -t msdos /dev/vnd1c /mnt
> mount_msdos: /dev/vnd1c on /mnt: not an MSDOS filesystem
> fw1# mount -t ext2fs /dev/vnd1c /mnt
> mount_ext2fs: /dev/vnd1c on /mnt: Input/output error
>
> As you can see, none of the the types I know about are working?
>

Perhaps the filesystem type isn't the problem.


> bsd1# disklabel vnd1
> # /dev/rvnd1c:
> type: vnd
> disk: vnd device
> label: fictitious
> duid: e5445c1e269855f0
> flags:
> bytes/sector: 512
> sectors/track: 100
> tracks/cylinder: 1
> sectors/cylinder: 100
> cylinders: 7382
> total sectors: 738240
> boundstart: 1024
> boundend: 737280
> drivedata: 0
> 16 partitions:
> #                size           offset  fstype [fsize bsize   cpg]
>   a:           736256             1024  4.2BSD   2048 16384 16142
>   c:           738240                0  unused
>   i:              960               64   MSDOS
>
> I cannot work out what the filesystem should be? It shows as 'unused'
> here.
>

c isn't a real partition.  It represents the whole disk.  Read the
disklabel output again.