-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 One point to add here, incidentally, is that static FD's on Solaris do not seem to be possible. I'd love for someone to prove me wrong on that one. In any case, this guide gets around that by copying the libraries necessary along with the file.
Ryan Novosielski wrote: > Since Mr. Hartzell does not appear to be answering his e-mail, and my > feeling is that he would not mind helping others on this, I'll post his > recipe to the list. > > Hopefully this gets the ball rolling for some people. > > A Think Tank wrote: >> Anyone come up with anything on this one? > >> I'm about to go live with a home brewed wing and a prayer backup plan >> for bare metal restores. > > >> Paul > >> Ryan Novosielski wrote: >> I have located this. Its author is Robert Hartzell -- are we speaking >> about the same thing? The name popped into my head today and once I >> searched on it, the README that he wrote popped up immediately. As he >> never posted it to the list, I'd like to get his permission first, but I >> assume that that will be no problem. Just when someone doesn't post >> something to the list, I have to assume they might have a reason. > >> He started using an 03/05 disc and building a restore disc from that, >> but apparently he since tried it with 01/06 and this works fine as well. >> He thinks it should work on Solaris 9 as well, and I'd wager it works on >> 06/06, as there were no changes that should affect the ability to >> conduct a restore on this version. > >> Note, he attempted this on x86. I am very interested in doing it on >> SPARC, and in fact may try to get it going this afternoon. > >> Paul Norland wrote: > >>>>> Kern Sibbald wrote: >>>>> >>>>>> On Friday 10 November 2006 16:15, Ryan Novosielski wrote: >>>>>> >>>>>> >>>>>>> If I'm not mistaken (and now I'm thinking I may have lost this stuff due >>>>>>> to an old e-mail purge), someone has done some substantial work doing >>>>>>> bare-metal restores on Solaris. I don't remember the gentleman's name, >>>>>>> but I believe he posted to the list. >>>>>>> >>>>>>> >>>>>> Yes, now that you mention it, I recall that someone did get rescue >>>>>> working on >>>>>> Solaris, but to the best of my knowledge the code was never posted. If >>>>>> someone has the time to check the archives and prove me wrong, he would >>>>>> be >>>>>> doing the Solaris users a big favor as I would be very happy to accept >>>>>> such >>>>>> code ... :-) >>>>>> >>>>>> >>>>> I would consider that a HUGE favor. I have time, motivation and >>>>> Solaris boxes to help in making this happen. What I don't have yet is >>>>> the wisdom. >>>>> >>>>> I have tried the archives, and found many references to the code, but no >>>>> actual code. Last week I even dropped a note to the person who said >>>>> that they had a working sample, but no reply as of yet. >>>>> >>>>> Paul >>>>> [EMAIL PROTECTED] com >>>>> http://www.athinktank.com >>>>> >>>>>> >>>>>> >>>>>>> Kern Sibbald wrote: >>>>>>> >>>>>>> >>>>>>>> On Wednesday 08 November 2006 19:52, A Think Tank wrote: >>>>>>>> >>>>>>>> >>>>>>>>> I am trying to go though the rescue procedures / preparation for >>>>>>>>> Solaris, SunOS 5.10 Generic sun4u sparc SUNW,Sun-Fire-V240, as >>>>>>>>> directed >>>>>>>>> by the documentation. I have a couple of errors with the command >>>>>>>>> /usr/local/src/bacula-rescue-1.8.6/solaris/getdiskinfo >>>>>>>>> >>>>>>>>> Error on if statement >>>>>>>>> >>>>>>>>> Begin collecting system info >>>>>>>>> ../getdiskinfo: test: argument expected >>>>>>>>> >>>>>>>>> I changed the if syntax to read: >>>>>>>>> - if [ -e /etc/fstab ]; then >>>>>>>>> + if [ -r /etc/fstab ]; then >>>>>>>>> for all instances of the -e expression and it seemed to work just >>>>>>>>> fine. >>>>>>>>> It identified that i have a vfstab file and read that. >>>>>>>>> >>>>>>>>> Error on route command. >>>>>>>>> >>>>>>>>> "route -n >route.bsi" >>>>>>>>> error message >>>>>>>>> usage: route [ -fnqv ] cmd [[ -<qualifers> ] args ] >>>>>>>>> >>>>>>>>> I am just not sure how to fix this, because I am not sure what the >>>>>>>>> command is trying to gather. >>>>>>>>> Currently both the df.bsi and route.bsi files are empty. The other >>>>>>>>> files seem to have been created just fine. >>>>>>>>> >>>>>>>>> I presume that the df.bsi file should contain data, but again, not >>>>>>>>> sure >>>>>>>>> what and there was no error message. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> Hmmm. The problem is that no one has yet converted the Linux scripts >>>>>>>> to >>>>>>>> >>>>>>>> >>>>>> work >>>>>> >>>>>> >>>>>>>> on Solaris. There are a lot of important and subtle differences >>>>>>>> between >>>>>>>> Linux and Solaris, eg most "if [ -e xxx ]" should be "if [ -f xxx ]" >>>>>>>> ... >>>>>>>> >>>>>>>> There are also a lot of major differences in terms of what info needs >>>>>>>> to >>>>>>>> >>>>>>>> >>>>>> be >>>>>> >>>>>> >>>>>>>> saved to reconstruct a system. >>>>>>>> >>>>>>>> I suspect that you might be better off starting with some existing >>>>>>>> Solaris >>>>>>>> script that saves the system, then adding to it the necessary Bacula >>>>>>>> >>>>>>>> >>>>>> stuff. >>>>>> >>>>>> >>>>>>>> ------------------------------------------------------------------------- >>>>>>>> Using Tomcat but need to do more? Need to support web services, >>>>>>>> security? >>>>>>>> Get stuff done quickly with pre-integrated technology to make your job >>>>>>>> >>>>>>>> >>>>>> easier >>>>>> >>>>>> >>>>>>>> Download IBM WebSphere Application Server v.1.0.1 based on Apache >>>>>>>> Geronimo >>>>>>>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >>>>>>>> _______________________________________________ >>>>>>>> Bacula-users mailing list >>>>>>>> Bacula-users@lists.sourceforge.net >>>>>>>> https://lists.sourceforge.net/lists/listinfo/bacula-users >>>>>>>> >>>>>>>> >>>>>>> -- >>>>>>> ---- _ _ _ _ ___ _ _ _ >>>>>>> |Y#| | | |\/| | \ |\ | | |Ryan Novosielski - Systems Programmer III >>>>>>> |$&| |__| | | |__/ | \| _| |[EMAIL PROTECTED] - 973/972.0922 (2-0922) >>>>>>> \__/ Univ. of Med. and Dent.|IST/AST - NJMS Medical Science Bldg - C630 >>>>>>> >>>>>>> >>>>>>> ------------------------------------------------------------------------- >>>>>>> Using Tomcat but need to do more? Need to support web services, >>>>>>> security? >>>>>>> Get stuff done quickly with pre-integrated technology to make your job >>>>>>> >>>>>>> >>>>>> easier >>>>>> >>>>>> >>>>>>> Download IBM WebSphere Application Server v.1.0.1 based on Apache >>>>>>> Geronimo >>>>>>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >>>>>>> _______________________________________________ >>>>>>> Bacula-users mailing list >>>>>>> Bacula-users@lists.sourceforge.net >>>>>>> https://lists.sourceforge.net/lists/listinfo/bacula-users >>>>>>> >>>>>>> >>>>>>> >>>>>> ------------------------------------------------------------------------- >>>>>> Using Tomcat but need to do more? Need to support web services, security? >>>>>> Get stuff done quickly with pre-integrated technology to make your job >>>>>> easier >>>>>> Download IBM WebSphere Application Server v.1.0.1 based on Apache >>>>>> Geronimo >>>>>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >>>>>> _______________________________________________ >>>>>> Bacula-users mailing list >>>>>> Bacula-users@lists.sourceforge.net >>>>>> https://lists.sourceforge.net/lists/listinfo/bacula-users >>>>>> >>>>>> >>>>>> >>>>> ------------------------------------------------------------------------ >>>>> >>>>> ------------------------------------------------------------------------- >>>>> Using Tomcat but need to do more? Need to support web services, security? >>>>> Get stuff done quickly with pre-integrated technology to make your job >>>>> easier >>>>> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo >>>>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 >>>>> >>>>> >>>>> ------------------------------------------------------------------------ >>>>> >>>>> _______________________________________________ >>>>> Bacula-users mailing list >>>>> Bacula-users@lists.sourceforge.net >>>>> https://lists.sourceforge.net/lists/listinfo/bacula-users >>>>> > - ------------------------------------------------------------------------ Quick guide on how to make a custom Solaris boot CD to use as a Bacula client rescue CD for Solaris 10_03/05 x86 (FCS). copyright Robert W Hartzell 2006-04-21 <rwhartz at cox.net> What you will need: 1) Static compiled file daemon and config files for your setup. 2) Solaris 10_03/05 CD 1 of 4 3) CD Burner 4) super-user access to build the miniroot & iso image. 1) mkdir /tmp/isodir 2) Create an empty file to hold the miniroot plus a little extra room and leaves about 290mb free on the CD # mkfile 360m /var/tmp/miniroot 3) Map the file to a block device # lofiadm -a /var/tmp/miniroot /dev/lofi/1 4) Create a new file system on the miniroot # newfs -i 8192 -m 1 /dev/rlofi/1 newfs: construct a new file system /dev/rlofi/1: (y/n)? y /dev/rlofi/1: 736800 sectors in 1228 cylinders of 1 tracks, 600 sectors 359.8MB in 77 cyl groups (16 c/g, 4.69MB/g, 576 i/g) super-block backups (for fsck -F ufs -o b=#) at: 32, 9632, 19232, 28832, 38432, 48032, 57632, 67232, 76832, 86432, 643232, 652832, 662432, 672032, 681632, 691232, 700832, 710432, 720032, 729632 5) Mount the block device # mount /dev/lofi/1 /mnt 6) Copy the root image to the miniroot file system # cd /cdrom/cdrom0/s0 # find . -depth -print | cpio -pdm /mnt 780288 blocks 7) Add your static built fd and config files to /mnt I just reproduced my production directory structure so it looks like this but you can place the files however you want. Just make sure they match the config files. # cd /mnt/ # ls -R opt/local opt/local: bin etc sbin opt/local/bin: bacula bconsole btraceback.dbx btraceback.gdb gconsole opt/local/etc: bacula opt/local/etc/bacula: bacula-ctl-fd bacula-fd.conf bconsole.conf opt/local/sbin: bacula-fd bconsole btraceback Edit your config files so that the working directory is /tmp so bacula has writable place to put the pid and state file. I also needed to copy some gcc libs from /usr/sfw/lib to the miniroot and setup a couple of softlinks. Put them in the /mnt/usr/sfw/lib # cd /mnt/usr/sfw/lib # cp /usr/sfw/lib/libgcc_s.so.1 . # ln -s libgcc_s.so.1 libgcc_s.so # cp /usr/sfw/lib/libstdc++.so.6.0.3 . # ln -s libstdc++.so.6.0.3 libstdc++.so.6 8) Unmount the file system and delete the lofi device # umount /mnt # lofiadm -d /dev/lofi/1 9) Extract the boot files from the CD a) Turn off the volume manager # /etc/init.d/volmgt stop b) The CD should stll be in the drive. Make sure you use the correct device for your CDROM drive # dd if=/dev/dsk/c1t0d0p0 of=/tmp/mboot+pboot.cd bs=512 count=2 2+0 records in 2+0 records out c) Save the bootblk into a file named bootblk.cd # dd if=/dev/dsk/c1t0d0p0 of=/tmp/bootblk.cd bs=512 iseek=4 count=60 60+0 records in 60+0 records out 10) Create the boot files a) Create the bootimage # cp /tmp/mboot+pboot.cd /tmp/isodir/.bootimage b) Create the boot file with a 1k gap in the file # cp /tmp/mboot+pboot.cd /tmp/genboot # dd if=/dev/zero bs=1024 count=1 >> /tmp/genboot 1+0 records in 1+0 records out # cat /tmp/bootblk.cd >> /tmp/genboot 11) Add your custom content to the CD image (max size is about 290mb) I haven't messed with this yet but you should be able to place just about anything you want in the /tmp/isodir before you create iso image. It would be a good place to put config files for other systems. Whatever program you run has to fit in available memory. 12) Create the CD image using mkisofs # mkisofs -r -no-emul-boot \ -b .bootimage \ -c .catalog \ -G genboot \ -o bacula-rescue.iso \ -sunx86-boot /var/tmp/miniroot \ /tmp/isodir/ Size of boot image is 4 sectors -> No emulation Total translation table size: 2048 Total rockridge attributes bytes: 331 Total directory bytes: 0 Path table size(bytes): 10 Total extents including Solaris x86 boot = 184480 Max brk space used 8000 184630 extents written (360 MB) 13) Create the custom boot CD a) Restart volmgt # /etc/init.d/volmgt start volume management starting. b) Burn the image (use the correct device for your burner). You can get the correct device with: # /opt/sfw/bin/cdrecord -scanbus Burn the image with: # /opt/sfw/bin/cdrecord dev=1,0,0 -v -eject /tmp/bacula-rescue.iso 14) Now your ready to boot the the system with the rescue CD a) Insert the rescue CD and boot the system. b) Choose option 4 Solaris Interactive Text (Console session) c) Allow the install routine continue and setup the networking information according to your site. d) When you see the "Solaris Interactive Installation" screen exit the install routine with F5 then confirm with F2 e) Format and partition the new hard drive (duplicate the partitioning scheme that was used on the old HD). f) Create the file systems with newfs, check them with fsck. g) Mount the HD to /mnt h) Start the bacula file daemon with: /opt/local/bin/bacula start and then bconsole with: /opt/local/bin/bconsole You should now be connected to you backup server and ready to restore your system to /mnt i) After the restore is complete you need to make the new HD bootable with installboot (details on how to do this in the next rev of the doc) For reference (man installboot) j) reboot - ------------------------------------------------------------------------ - ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV - ------------------------------------------------------------------------ _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users - -- ---- _ _ _ _ ___ _ _ _ |Y#| | | |\/| | \ |\ | | |Ryan Novosielski - Systems Programmer III |$&| |__| | | |__/ | \| _| |[EMAIL PROTECTED] - 973/972.0922 (2-0922) \__/ Univ. of Med. and Dent.|IST/AST - NJMS Medical Science Bldg - C630 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFbGoEmb+gadEcsb4RAkEUAKDY4TgBpx1y0w/joYUpz1/BObM+0gCfRXaj KGmU6uhGREL2fZ0ktSCOt0I= =Hga2 -----END PGP SIGNATURE----- ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Bacula-users mailing list Bacula-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users