From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96075325006424.tru64-unix-managers.marc@archive.invalid> From: Jim Wright Date: Wed, 01 Nov 1995 05:20:58 +0000 To: tru64-unix-managers Subject: creating bootable cdroms X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96075325006424 Hello wizards. I'm faced with upgrading a couple dozen Alphas from 2.0 to 3.2C. All of them mount their /usr partition from a main server. This worked with little modification under 2.0, but with 3.2C it seems a bunch of stuff early in the boot sequence requires the use of /usr programs. But that is a rant for another day. I want to create a bootable CD-ROM which will have a filesystem dump for / and /var which I can restore to the various workstations plus other tools and custom configuration scripts. I will then be able to go to each machine and quickly install the new operating system. My problem is in getting a CD-ROM which is bootable. I've built up an old RZ24 disk with everything I want on the CD-ROM. I can boot from it, and I get / as a memory file system with the disk mounted read-only in a subdirectory. (Sound similar to the OSF/1 distribution CD-ROM? :) But when I transfer this to CD-ROM, I get an unmountable CD-ROM. Any hints or advice on this? Some details... % /usr/sbin/mount -t ufs -o ro /dev/rz4c /cdrom /dev/rz4c on /cdrom: No valid filesystem exists on this partition % /usr/sbin/fsck -n -o /dev/rz4c /sbin/ufs_fsck -n -o /dev/rz4c ** /dev/rrz4c (NO WRITE) ** Last Mounted on /IMAGE ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 160 files, 34763 used, 162635 free (235 frags, 20300 blocks, 0.1% fragmentation) % /usr/sbin/disklabel rrz4c # /dev/rrz4c: type: SCSI disk: rz24 label: flags: bytes/sector: 512 sectors/track: 38 tracks/cylinder: 8 sectors/cylinder: 304 cylinders: 1348 sectors/unit: 409792 rpm: 3600 interleave: 1 trackskew: 0 cylinderskew: 0 headswitch: 0 # milliseconds track-to-track seek: 0 # milliseconds drivedata: 0 8 partitions: # size offset fstype [fsize bsize cpg] a: 131072 0 unused 1024 8192 # (Cyl. 0 - 431*) b: 262144 131072 unused 1024 8192 # (Cyl. 431*- 1293*) c: 409792 0 4.2BSD 1024 8192 16 # (Cyl. 0 - 1347) d: 0 0 unused 1024 8192 # (Cyl. 0 - -1) e: 0 0 unused 1024 8192 # (Cyl. 0 - -1) f: 278720 131072 unused 1024 8192 # (Cyl. 431*- 1347*) g: 16576 393216 unused 1024 8192 # (Cyl. 1293*- 1347*) h: 0 0 unused 1024 8192 # (Cyl. 0 - -1) I can boot from this CD-ROM -- valid boot block, loads /vmunix, etc. -- but when it tries to mount the CD-ROM as a filesystem it chokes and dies. I've tried fudging the disklabel on the hard drive so that when I create a CD-ROM the new disklabel has the same info as the OSF/1 distribution disc. Still no joy. % cat mymount.c #include #include #include main() { int rtrn; struct ufs_args arg; arg.fspec = "/dev/rz4c"; arg.exflags = M_EXRDONLY; arg.exroot = 0; rtrn = mount(MOUNT_UFS, "/cdrom", M_RDONLY, &arg); printf ("mount returned %d\n", rtrn); perror (""); } % cc -o mymount mymount.c % ./mymount mount returned -1 Invalid argument Looking in mount(2) I see The following errors can occur for a UFS file system mount: [EINVAL] The superblock for the file system had a bad magic number or an out-of-range block size. I seem to be mighty damn close, but missing something. What? Jim Wright Keck Center for Integrative Neuroscience jwright@phy.ucsf.edu Box 0444, Room HSE-802 voice 415-502-4874 513 Parnassus Ave fax 415-502-4848 UCSF, San Francisco, CA 94143-0444