DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

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

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 13th August 2010
rtwingfield rtwingfield is offline
Real Name: Ron Wingfield
Port Guard
 
Join Date: Oct 2008
Location: Little Rock, AR USA
Posts: 29
Thanked 0 Times in 0 Posts
Default mkisofs and cdrecord with tar

Note that the tar command componet is comm'ed-out;
-dummy is specified to turn off the laser (to avoid wasting a CD);
and -dd is specifed to provide more diagnostics.


I'm having problems with the device designation. Suggestions anyone?


The backup_whatever script:

#tar -c /www/vhosts/website.org | \
mkisofs -stream-media-size 333000 | \
cdrecord -dummy -dd dev=/dev/acd0 -dao tsize=333000s -


Execution failure:

# backup_whatever
dev: '/dev/acd0' speed: -1 fs: -1 driveropts '(NULL POINTER)'
Cdrecord-Clone 2.01 (i386-unknown-freebsd4.8) Copyright (C) 1995-2004 Jörg Schilling
TOC Type: 1 = CD-ROM
fs: 4194304 buflen: 4198400
cdrecord: shared memory segment attached at: 28156000 size 4198400
buf: 28156000 bufend: 28557000, buflen: 4198400
buf: 28156000 bufend: 28557000, buflen: 4198400 (align 0)
scsidev: '/dev/acd0'
devname: '/dev/acd0'
scsibus: -2 target: -2 lun: -2
scg__open(/dev/acd0) -2,-2,-2
cdrecord: Invalid argument. Open by 'devname' not supported on this OS. Cannot open SCSI driver.
cdrecord: For possible targets try 'cdrecord -scanbus'.
cdrecord: For possible transport specifiers try 'cdrecord dev=help'.
#

. . .so we run with -scanbus:

# cdrecord -scanbus
Cdrecord-Clone 2.01 (i386-unknown-freebsd4.8) Copyright (C) 1995-2004 Jörg Schilling
cdrecord: Device not configured. Open of /dev/xpt0 failed. Cannot open SCSI driver.
cdrecord: For possible targets try 'cdrecord -scanbus'.
cdrecord: For possible transport specifiers try 'cdrecord dev=help'.
#

. . .don't know where /dev/xpt0 came from !!!


Well . . .attempt with dev=scsibus,target,lun scenario (e.g., dev=0,1,0)


#tar -c /www/vhosts/website.org | \
mkisofs -stream-media-size 333000 | \
cdrecord -dummy -dd dev=0,1,0 -dao tsize=333000s -

# backup_whatever
dev: '0,1,0' speed: -1 fs: -1 driveropts '(NULL POINTER)'
Cdrecord-Clone 2.01 (i386-unknown-freebsd4.8) Copyright (C) 1995-2004 Jörg Schilling
TOC Type: 1 = CD-ROM
fs: 4194304 buflen: 4198400
cdrecord: shared memory segment attached at: 28156000 size 4198400
buf: 28156000 bufend: 28557000, buflen: 4198400
buf: 28156000 bufend: 28557000, buflen: 4198400 (align 0)
scsidev: '0,1,0'
scsibus: 0 target: 1 lun: 0
scg__open() 0,1,0
cdrecord: Device not configured. Cannot open SCSI driver.
cdrecord: For possible targets try 'cdrecord -scanbus'.
cdrecord: For possible transport specifiers try 'cdrecord dev=help'.
archaxis #

Last edited by rtwingfield; 13th August 2010 at 11:28 AM. Reason: . . .grammar & spelling corrections.
Reply With Quote
  #2   (View Single Post)  
Old 13th August 2010
roddierod's Avatar
roddierod roddierod is offline
Real Name: Rod Person
VPN Cryptographer
 
Join Date: Apr 2008
Location: Pittsburgh, Pa
Posts: 371
Thanked 13 Times in 13 Posts
Default

Do you have atapicam loaded?

Code:
kldstat
Will show what is loaded. If not loaded You'll can load it with

Code:
kldload atapicam
http://www.freebsd.org/doc/en_US.ISO...ating-cds.html
__________________
"The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use the words." -Philip K. Dick
Reply With Quote
  #3   (View Single Post)  
Old 13th August 2010
rtwingfield rtwingfield is offline
Real Name: Ron Wingfield
Port Guard
 
Join Date: Oct 2008
Location: Little Rock, AR USA
Posts: 29
Thanked 0 Times in 0 Posts
Default Now Trying to Use burncd

. . .overlooking the obvious, atapicam is not loaded. I had added atapicam_load="YES" to the /boot/loader.conf file, but after rebooting, I did not notice (in the messages log) that the load of atapicam failed. Further more, the module is not found on this FreeBSD v4.8 system; however, it is loadable on my v7.2 system.

Regardless, after some additional reading, I'm attempting to use burncd as follows, and the only questionable (not to imply successful) write to the CDROM results from the following script:

tar -vcf tar.out -C /www/vhosts/AR042SWRCAP.org . | \
burncd -v -f /dev/acd0a data -


. . .execution produces the following:

# backup_whatever
adding type 0x08 file - size 0 KB 0 blocks (0 padded)
next writeable LBA 0
addr = 0 size = -1 blocks = 0
writing from stdin
written this track 1250 KB total 1250 KB
only wrote -1 of 2048 bytes err=5



I'm trying to follow the man pages for tar, mkisofs and burncd. Shouldn't the pipe through mkisofs be required? The CDROM disk cannot be mounted on FreeBSD or read by Windoze.

Also, from what I've read, the tar command should not specify -f tar.out. The intent should be to pipe the output of tar through mkisofs and into burncd.

Last edited by rtwingfield; 13th August 2010 at 05:42 PM. Reason: . . .additional info.
Reply With Quote
  #4   (View Single Post)  
Old 13th August 2010
roddierod's Avatar
roddierod roddierod is offline
Real Name: Rod Person
VPN Cryptographer
 
Join Date: Apr 2008
Location: Pittsburgh, Pa
Posts: 371
Thanked 13 Times in 13 Posts
Default

You are trying this on 4.8?

Back in the 4.8 days atapicam was not a loadable module you had to rebuild your kernel and the why to rebuild the kernel is different from the why it is done now.

My memory could be bad, but I think burncd had issues back then.

If you stuck with that being a 4.8 machine I suggest looking /usr/share/doc/en/books at the handbook specific to 4.8.
__________________
"The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use the words." -Philip K. Dick
Reply With Quote
  #5   (View Single Post)  
Old 13th August 2010
rtwingfield rtwingfield is offline
Real Name: Ron Wingfield
Port Guard
 
Join Date: Oct 2008
Location: Little Rock, AR USA
Posts: 29
Thanked 0 Times in 0 Posts
Wink

RE:

Quote:
Back in the 4.8 days atapicam was not a loadable module you had to rebuild your kernel and the why to rebuild the kernel is different from the why it is done now.
. . .yeah, that's what I've suspected; however, the man pages for burncd on v4.8 state

Quote:
HISTORY
The burncd utility appeared in FreeBSD 4.0.
Regarding my shell script running on either either v4.8 or v7.2, shouldn't mkisofs be part of the mix?

The "big picture" goal is to upgrade the v4.8 box to v7.2 or 8+ ASAP. The v7.2 box is a prototype backup machine. We've got a lot of stuff running on the old v4.8 box and I want to "clone" the systems to the v7.2 box . . .so that it can run as the production server(s) while the old box is upgraded.

I would like to use a tar-to-CDRW scenario to backup the systems on a periodic basis . . .no more tapes. I could use sftp to "clone" the old to the new box, but seems to me that tar with "differences" would be useful.

BTW . . .if you wondering why we're still running v4.8 . . .well, if it ain't broke, then don't fix it . . .that's more than Windoze can say.

Last edited by rtwingfield; 13th August 2010 at 06:36 PM. Reason: . . .as usual grammar and clarification
Reply With Quote
  #6   (View Single Post)  
Old 13th August 2010
roddierod's Avatar
roddierod roddierod is offline
Real Name: Rod Person
VPN Cryptographer
 
Join Date: Apr 2008
Location: Pittsburgh, Pa
Posts: 371
Thanked 13 Times in 13 Posts
Default

mkisofs will create a valid iso to burn to the cd. If your just burning tar files to the cd your could probably skip it.

I'd personally wouldn't write the script to pipe from tar directly to cd unless I was absolutely sure the files were going to be less that 700M.

I backed up to tape or DVD.
__________________
"The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use the words." -Philip K. Dick
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


All times are GMT. The time now is 06:20 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