DaemonForums  

Go Back   DaemonForums > Miscellaneous > Guides

Guides All Guides and HOWTO's.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 24th November 2009
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,140
Thanked 182 Times in 149 Posts
Default Mounting six CentOS iso images on OpenBSD

Mounting six CentOS iso images on OpenBSD

Table of contents
  • 1 Introduction
  • 1.1 Increasing the default nr of 4 vnd devices
  • 1.2 Creating vnd4 and vnd5 in '/dev'
  • 1.3 Enabling the 'ftpd' server
  • 1.4 Writing the CentOS netinstall.iso to CD-RW
  • 1.5 Mounting the CentOS iso images
  • 2.1 Does audacity on CentOS work OK with the Akai ATT05U USB turntable??

Mounting six CentOS iso images on OpenBSD




1 Introduction

This year Father's day my daughter surprised me with an Akai ATT05U USB turntable. That way I could finally convert my collection of old vinyl records to a digital format.

Because the OpenBSD Audacity port did not recognize the turntable I was forced to go the Linux way. I decided to try CentOS, which essentially is a repackaging of Red Hat Enterprise Linux.

The complete CentOS install spans 6 CD's. To save time I decided to do a ftp install. The following tip from the CentOS installation manual even saved me from having to unpack the six iso images.

Code:
You can save disk space by using the ISO images you have already copied
to the server. To accomplish this, install Red Hat Enterprise Linux using
ISO images without copying them into a single tree by loopback mounting them.
For each ISO image:

  mkdir discX
  mount -o loop RHEL5-discX.iso discX

Replace X with the corresponding disc number.
On OpenBSD mounting an iso image is done with the vnconfig command. From the vnconfig(5)

Code:
# vnconfig svnd0 /tmp/diskimage
# mount -t cd9660 /dev/svnd0c /mnt



1.1 Increasing the default nr of 4 vnd devices

The simple sh script I wrote to automate the vnconfig and mount commands gave errors on the fifth and sixth iso images. The vnd(4) man page explains why:

Code:
     In order to compile in support for vnd devices, a line similar to the
     following must be present in the kernel configuration file:

           pseudo-device  vnd  4    # vnode disk driver

     The count argument is how many vnds memory is allocated for at boot time.
     In this example, no more than 4 vnds may be configured.
Instead of recompiling the OpenBSD kernel I decided to use UKC (User Kernel Config) as mentioned in the OpenBSD FAQ:

Code:
5.9 - Using config(8) to change your kernel

The -e and -u options with config(8) can be extremely helpful and save
wasted time compiling your kernel. The -e flag allows you to enter the
UKC or User Kernel Config on a running system. These changes will then
take place on your next reboot.
After reading the config(8) man page for the correct option syntax:

Code:
root@hercules[~] config -fe /bsd
OpenBSD 4.2 (GENERIC) #1179: Tue Aug 28 10:37:50 MDT 2007
    deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC
Enter 'help' for information
ukc> find vnd
286 vnd count 4 (pseudo device)
ukc> change vnd
286 vnd count 4 (pseudo device)
change [n] y
count [4] ? 6
286 vnd changed
286 vnd count 6 (pseudo device)
ukc> quit
Saving modified kernel.
root@hercules[~]
Being in a healthy administrator paranoia mood I checked the change with:

Code:
root@hercules[~] config -e /bsd
OpenBSD 4.2 (GENERIC) #1179: Tue Aug 28 10:37:50 MDT 2007
    deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC
warning: no output file specified
Enter 'help' for information
ukc> find vnd
286 vnd count 6 (pseudo device)
ukc> quit
not forced
root@hercules[~]



1.2 Creating vnd4 and vnd5 in '/dev'

Code:
# cd /dev ; ./MAKEDEV vnd4 vnd5
# ls -l svnd[45]?
brw-r-----  1 root  operator   14, 2112 Nov 18 23:28 svnd4a
brw-r-----  1 root  operator   14, 2113 Nov 18 23:28 svnd4b
brw-r-----  1 root  operator   14, 2114 Nov 18 23:28 svnd4c
brw-r-----  1 root  operator   14, 2115 Nov 18 23:28 svnd4d
brw-r-----  1 root  operator   14, 2116 Nov 18 23:28 svnd4e
brw-r-----  1 root  operator   14, 2117 Nov 18 23:28 svnd4f
brw-r-----  1 root  operator   14, 2118 Nov 18 23:28 svnd4g
brw-r-----  1 root  operator   14, 2119 Nov 18 23:28 svnd4h
brw-r-----  1 root  operator   14, 2120 Nov 18 23:28 svnd4i
brw-r-----  1 root  operator   14, 2121 Nov 18 23:28 svnd4j
brw-r-----  1 root  operator   14, 2122 Nov 18 23:28 svnd4k
brw-r-----  1 root  operator   14, 2123 Nov 18 23:28 svnd4l
brw-r-----  1 root  operator   14, 2124 Nov 18 23:28 svnd4m
brw-r-----  1 root  operator   14, 2125 Nov 18 23:28 svnd4n
brw-r-----  1 root  operator   14, 2126 Nov 18 23:28 svnd4o
brw-r-----  1 root  operator   14, 2127 Nov 18 23:28 svnd4p
brw-r-----  1 root  operator   14, 2128 Nov 18 23:28 svnd5a
brw-r-----  1 root  operator   14, 2129 Nov 18 23:28 svnd5b
brw-r-----  1 root  operator   14, 2130 Nov 18 23:28 svnd5c
brw-r-----  1 root  operator   14, 2131 Nov 18 23:28 svnd5d
brw-r-----  1 root  operator   14, 2132 Nov 18 23:28 svnd5e
brw-r-----  1 root  operator   14, 2133 Nov 18 23:28 svnd5f
brw-r-----  1 root  operator   14, 2134 Nov 18 23:28 svnd5g
brw-r-----  1 root  operator   14, 2135 Nov 18 23:28 svnd5h
brw-r-----  1 root  operator   14, 2136 Nov 18 23:28 svnd5i
brw-r-----  1 root  operator   14, 2137 Nov 18 23:28 svnd5j
brw-r-----  1 root  operator   14, 2138 Nov 18 23:28 svnd5k
brw-r-----  1 root  operator   14, 2139 Nov 18 23:28 svnd5l
brw-r-----  1 root  operator   14, 2140 Nov 18 23:28 svnd5m
brw-r-----  1 root  operator   14, 2141 Nov 18 23:28 svnd5n
brw-r-----  1 root  operator   14, 2142 Nov 18 23:28 svnd5o
brw-r-----  1 root  operator   14, 2143 Nov 18 23:28 svnd5p



1.3 Enabling the 'ftpd' server

Because I did not run 'inetd' I started the ftp server with:

Code:
# /usr/libexec/ftpd -DUS
# pgrep ftpd
3104
The real administrator will of course check with pgrep ftpd or inspect the process table with ps -ax. Trust but verify!




1.4 Writing the CentOS netinstall.iso to CD-RW

Blanking the CD-RW and writing the iso:

Code:
# cdio -f /dev/rcd0c blank
# cdio -f /dev/rcd0c tao -d /home/j65nko/CentOS-5.4-i386-netinstall.iso
A quick check:

Code:
# mount -t cd9660 /dev/cd0c /mnt ; ls -l /mnt
-r--r--r--  1 root  wheel   220 Oct  2 14:25 TRANS.TBL
drwxr-xr-x  2 root  wheel  2048 Oct  2 14:25 isolinux

# ls -l /mnt/isolinux/
total 17358
-r--r--r--  1 root  wheel     2659 Oct  2 14:25 TRANS.TBL
-r--r--r--  1 root  wheel     2048 Oct  2 14:25 boot.cat
-rw-r--r--  2 root  wheel      292 Oct  2 14:25 boot.msg
-rw-r--r--  2 root  wheel      919 Oct  2 14:25 general.msg
-rw-r--r--  2 root  wheel  6858123 Oct  2 14:24 initrd.img
-r--r--r--  2 root  wheel    10648 Oct  2 14:24 isolinux.bin
-r-xr-xr-x  2 root  wheel      366 Oct  2 14:25 isolinux.cfg
-r--r--r--  2 root  wheel    94600 Oct  2 14:25 memtest
-rw-r--r--  2 root  wheel      817 Oct  2 14:25 options.msg
-rw-r--r--  2 root  wheel      517 Oct  2 14:25 param.msg
-rw-r--r--  2 root  wheel      490 Oct  2 14:25 rescue.msg
-rw-r--r--  2 root  wheel    63803 Oct  2 14:25 splash.lss
-rw-r--r--  3 root  wheel  1855924 Oct  2 14:24 vmlinuz



1.5 Mounting the CentOS iso images

The following shell script takes care of creating the mount directories, associating the 'svnd' device with the iso images and mounting them.

Code:
# DEBUG='echo'
DEBUG=''

for X in 1 2 3 4 5 6  ; do
   ${DEBUG} mkdir -p disc${X}
   ${DEBUG} vnconfig svnd$((${X}-1)) ./CentOS-5.4-i386-bin-${X}of6.iso
   ${DEBUG} mount -t cd9660 /dev/svnd$((${X}-1))c ./disc${X}
done
A run with DEBUG set to the shell 'echo' command:

Code:
mkdir -p disc1
vnconfig svnd0 ./CentOS-5.4-i386-bin-1of6.iso
mount -t cd9660 /dev/svnd0c ./disc1
mkdir -p disc2
vnconfig svnd1 ./CentOS-5.4-i386-bin-2of6.iso
mount -t cd9660 /dev/svnd1c ./disc2
mkdir -p disc3
vnconfig svnd2 ./CentOS-5.4-i386-bin-3of6.iso
mount -t cd9660 /dev/svnd2c ./disc3
mkdir -p disc4
vnconfig svnd3 ./CentOS-5.4-i386-bin-4of6.iso
mount -t cd9660 /dev/svnd3c ./disc4
mkdir -p disc5
vnconfig svnd4 ./CentOS-5.4-i386-bin-5of6.iso
mount -t cd9660 /dev/svnd4c ./disc5
mkdir -p disc6
vnconfig svnd5 ./CentOS-5.4-i386-bin-6of6.iso
mount -t cd9660 /dev/svnd5c ./disc6
The actual run with DEBUG set to '' followed by a 'mount':

Code:
# sh centos-iso-mounting
# mount
/dev/wd0a on / type ffs (local, noatime, softdep)
/dev/svnd0c on /home/j65nko/disc1 type cd9660 (local, read-only)
/dev/svnd1c on /home/j65nko/disc2 type cd9660 (local, read-only)
/dev/svnd2c on /home/j65nko/disc3 type cd9660 (local, read-only)
/dev/svnd3c on /home/j65nko/disc4 type cd9660 (local, read-only)
/dev/svnd4c on /home/j65nko/disc5 type cd9660 (local, read-only)
/dev/svnd5c on /home/j65nko/disc6 type cd9660 (local, read-only)
As shown by this output the mount points are in my home directory. This is a deliberate choice. If the OpenBSD 'ftpd' detects another user than 'anonymous' or 'ftp', it will use this users home directory as default. This means that I had to tell the CentOS install program to use 'non-anonymous' ftp, upon it would prompt me for an user name and password.

A ftp login on the local machine itself:

Code:
$ ftp 127.0.0.1

Connected to 127.0.0.1.
220 hercules.utp.xnet FTP server ready.
Name (127.0.0.1:j65nko): 
331 Password required for j65nko.
Password:
230- OpenBSD 4.2 (GENERIC) #1179: Tue Aug 28 10:37:50 MDT 2007
230- 
230- Welcome to OpenBSD: The proactively secure Unix-like operating system.
230- 
230- Please use the sendbug(1) utility to report bugs in the system.
230- Before reporting a bug, please try to reproduce it with the latest
230- version of the code.  With bug reports, please try to ensure that
230- enough information to reproduce the problem is enclosed, and if a
230- known fix for it exists, include that as well.
230- 
230 User j65nko logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls disc1
150 Opening ASCII mode data connection for '/bin/ls'.
total 282
-rw-r--r--  1 root  wheel    102 Oct  2 14:36 .discinfo
-rw-r--r--  2 root  wheel    413 Oct  2 14:30 .treeinfo
drwxr-xr-x  2 root  wheel  77824 Oct  2 14:36 CentOS
-rw-r--r--  7 root  wheel    212 Jun 15  2008 EULA
-rw-r--r--  7 root  wheel  18009 Jun 15  2008 GPL
drwxr-xr-x  2 root  wheel  16384 Oct  2 14:36 NOTES
-rw-r--r--  2 root  wheel    655 Sep 29 01:57 RELEASE-NOTES-cs
-rw-r--r--  2 root  wheel   1401 Sep 29 01:57 RELEASE-NOTES-cs.html
-rw-r--r--  2 root  wheel    839 Sep 29 01:57 RELEASE-NOTES-de
-rw-r--r--  2 root  wheel   1571 Sep 29 01:57 RELEASE-NOTES-de.html
-rw-r--r--  2 root  wheel    694 Sep 29 01:57 RELEASE-NOTES-en
-rw-r--r--  2 root  wheel   1367 Sep 29 01:57 RELEASE-NOTES-en.html
-rw-r--r--  2 root  wheel    694 Sep 29 01:57 RELEASE-NOTES-en_US
-rw-r--r--  2 root  wheel   1367 Sep 29 01:57 RELEASE-NOTES-en_US.html
-rw-r--r--  2 root  wheel    788 Sep 29 01:57 RELEASE-NOTES-es
-rw-r--r--  2 root  wheel   1619 Sep 29 01:57 RELEASE-NOTES-es.html
-rw-r--r--  2 root  wheel    852 Sep 29 01:57 RELEASE-NOTES-fr
-rw-r--r--  2 root  wheel   1641 Sep 29 01:57 RELEASE-NOTES-fr.html
-rw-r--r--  2 root  wheel    766 Sep 29 01:57 RELEASE-NOTES-ja
-rw-r--r--  2 root  wheel   1565 Sep 29 01:57 RELEASE-NOTES-ja.html
-rw-r--r--  2 root  wheel    706 Sep 29 01:57 RELEASE-NOTES-nl
-rw-r--r--  2 root  wheel   1433 Sep 29 01:57 RELEASE-NOTES-nl.html
-rw-r--r--  2 root  wheel    752 Sep 29 01:57 RELEASE-NOTES-pt_BR
-rw-r--r--  2 root  wheel   1480 Sep 29 01:57 RELEASE-NOTES-pt_BR.html
-rw-r--r--  2 root  wheel    801 Sep 29 01:57 RELEASE-NOTES-ro
-rw-r--r--  2 root  wheel   1473 Sep 29 01:57 RELEASE-NOTES-ro.html
-rw-r--r--  2 root  wheel   1504 Jun 15  2008 RPM-GPG-KEY-CentOS-5
-rw-r--r--  7 root  wheel   1512 Jun 15  2008 RPM-GPG-KEY-beta
-r--r--r--  1 root  wheel   7048 Oct  2 14:42 TRANS.TBL
drwxr-xr-x  4 root  wheel   2048 Oct  2 14:36 images
drwxr-xr-x  2 root  wheel   2048 Oct  2 14:36 isolinux
drwxr-xr-x  2 root  wheel   2048 Oct  2 14:42 repodata
226 Transfer complete.
ftp> quit
221 Goodbye.
In case you wonder why 127.0.0.1:

Code:
$ netstat -an -f inet

Active Internet connections (including servers)
Proto Recv-Q Send-Q  Local Address          Foreign Address        (state)
tcp        0      0  *.21                   *.*                    LISTEN
tcp        0      0  *.6000                 *.*                    LISTEN
tcp        0      0  127.0.0.1.587          *.*                    LISTEN
tcp        0      0  127.0.0.1.25           *.*                    LISTEN
tcp        0      0  *.22                   *.*                    LISTEN
tcp        0      0  *.515                  *.*                    LISTEN
Active Internet connections (including servers)
Proto Recv-Q Send-Q  Local Address          Foreign Address        (state)
udp        0      0  192.168.222.20.27385   213.249.66.35.123     
udp        0      0  192.168.222.20.15181   77.245.91.218.123     
udp        0      0  192.168.222.20.44601   194.109.64.200.123    
udp        0      0  *.514                  *.*
This output shows that something is LISTENing on '*.21" where '*' means all addresses configured on this machine.

Code:
$ ftp 192.168.222.20
Connected to 192.168.222.20.
220 hercules.utp.xnet FTP server ready.
Name (192.168.222.20:j65nko): 
331 Password required for j65nko.
Password:
A 'netstat' invocation from another xterm shows the ftp command channel connection:

Code:
$ netstat -an -f inet -p tcp
Active Internet connections (including servers)
Proto Recv-Q Send-Q  Local Address          Foreign Address        (state)
tcp        0      0  192.168.222.20.21      192.168.222.20.43783   ESTABLISHED
tcp        0      0  192.168.222.20.43783   192.168.222.20.21      ESTABLISHED
tcp        0      0  *.21                   *.*                    LISTEN
tcp        0      0  *.6000                 *.*                    LISTEN
tcp        0      0  127.0.0.1.587          *.*                    LISTEN
tcp        0      0  127.0.0.1.25           *.*                    LISTEN
tcp        0      0  *.22                   *.*                    LISTEN
tcp        0      0  *.515                  *.*                    LISTEN




2.1 Does audacity on CentOS work OK with the Akai ATT05U USB turntable?

I do not know yet. Because of an unexpected event I still have to get acquainted with the CentOS package manager 'yum'. Because CentOS is based on Redhat Enterprise Linux, it does not support a lot of multimedia software in the standard repositories. And I haven't found time yet to add the recommended multimedia repository to the 'yum' configuration file.

Maybe I should have chosen Ubuntu or Fedora?

$Id: Mounting_6_CentOS_iso_files.xml,v 1.4 2009/11/24 05:36:07 j65nko Exp $
$Id: book-vbul-html.xsl,v 1.3 2008/12/24 02:59:45 j65nko Exp $
__________________
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
 

Tags
akai, akai att05u turntable, centos, iso image, mount, turntable, vnconfig, vnode

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
Some images are black in Firefox RandomSF FreeBSD Ports and Packages 14 7th January 2010 08:19 AM
HOWTO: mounting an USB device as normal non-root user in OpenBSD J65nko Guides 4 24th December 2008 01:43 AM
Official DVD images from FreeBSD team vermaden FreeBSD General 0 16th October 2008 06:11 PM
Which light Gui from modify images files? aleunix OpenBSD General 7 15th June 2008 04:32 PM
Number of Images exceeded 18Googol2 Feedback and Suggestions 2 10th May 2008 09:38 PM


All times are GMT. The time now is 10:44 AM.


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