LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > JDS
User Name
Password
JDS This forum is for the discussion of the Sun Java Desktop System.

Notices

Reply
 
LinkBack Search this Thread
Old 03-19-2005, 09:42 AM   #1
shshjun
Member
 
Registered: Nov 2004
Location: del
Distribution: jds
Posts: 88

Rep: Reputation: 15
captive rpm


can someone helpme to build captive 1.1.5 rpm for JDS please? it aways asks me for modversions.h which i don't have and i have no experience on make/config a kernel to get the file. i may need to have lufs module built first. if the rpm can include it, then makes it perfect to drop and use.

searched jdshelp.org and it's currently unavailable.

another questions: it seems to me that the latest release from jankratochvil/project/captive/ doesn't work with kernel 2.6.x due to kernel source tree changes. the project is currently inactive. will someone confirm this for me please?

many thanks, shen
 
Old 03-19-2005, 09:09 PM   #2
shshjun
Member
 
Registered: Nov 2004
Location: del
Distribution: jds
Posts: 88

Original Poster
Rep: Reputation: 15
well, it's not true turns out on kernel 2.6.x. one can run captive on it. i couldn't wait for reply and played it out, not elegent way though after have my kernel built from source.
i'd still like to get it work on jds II (or III soon?) just by some rpm -iv. i am embarassed to mention that i don't know how, mostly because of limited time on exploring this.
thanks, shen
 
Old 03-20-2005, 11:09 AM   #3
shshjun
Member
 
Registered: Nov 2004
Location: del
Distribution: jds
Posts: 88

Original Poster
Rep: Reputation: 15
Using Linux to backup and recover Windows and Linux systems

(i made a pdf on this but don't know how to upload in LQ)

Using Linux to backup and recover Windows and Linux systems
name: s. shen
date: 03/20/2005

This document explains how to backup windows/Linux (so that you don't need to install again and again).

The purpose is that you are running your fine-tuned system and now you are going to try something new but you are afraid of disturbing your system. The backup and recovery process described here will help you do that. Further, you can move your system from one partition to another, or even to other machine and let your system to adapt to hardware difference.

0.system configuration

the test is on HP pavilion 716n x86 workstation with 2 80GB hard disks and 1GB memory (allow 32M for graphic card)


It has the following system on
Windows XP prof with SP2 (winxp)
SUSE linux Server 9.0 (sles)
SUSE Linux Professional 9.2 (slp)
Java Desktop System Release II (jds)
Solaris 10 for x86 (solaris)
Minimum Java Desktop System with Grub (jdsboot)


The partition info is (using fdisk – l )
/dev
size
note
dev/hda1 (primary)
24G

dev/hda2 (primary)
24G
Windows user data (for system data)
dev/hda5 (extended)
4.8G
Windows user data (iso files etc)
dev/hda6
4.8G
Windows user data (holder for burning DVD)
dev/hda7
1G
Windows user data (for networkshare)
dev/hda8
700M
Windows user data (holder for burning CD)
dev/hda9
15G
SLES
dev/hda10
2G
Oss as sharing for operating systems
dev/hda11
600M
Boot loader using JDS grub
dev/hda12
2G
Linux swap
dev/hda1(primary)
30G
Reserverd for solaris
dev/hda2(primary)
24G
Windows user data (for private data, eg. itunes)
dev/hda5(extended)
2G
Linux swap
dev/hda6
12G
JDS
dev/hda7
12G
SLP


1.bootloader installation

do a minimum installtion of JDS just for grub loader, not x, no device drivers, no network. You may want to add your preferred editor (if not vi) such as pico

use reisefs is fine. I prefer to use ext3 for this partition.

the configuration files are:

linux:/media/iso # cat etc/fstab
/dev/hda11 / ext3 defaults 1 1
/dev/hda9 /sles auto noauto,user 0 0
/dev/hda10 /oss auto noauto,user 0 0
/dev/hdb6 /data3 auto noauto,user 0 0
/dev/hdb7 /data4 auto noauto,user 0 0
/dev/hda12 swap swap pri=42 0 0
/dev/hdb5 swap swap pri=42 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0
proc /proc proc defaults 0 0
usbdevfs /proc/bus/usb usbdevfs noauto 0 0
/dev/cdrecorder /media/cdrecorder auto ro,noauto,user,exec 0 0
/dev/cdrom /media/cdrom auto ro,noauto,user,exec 0 0
/dev/dvd /media/dvd auto ro,noauto,user,exec 0 0
/dev/fd0 /media/floppy auto noauto,user,sync 0 0

linux:/media/iso # cat boot/grub/menu.lst
gfxmenu (hd0,10)/boot/message
color white/blue black/light-gray
default 0
timeout 8

title jds - java desktop system ii
kernel (hd1,5)/boot/vmlinuz root=/dev/hdb6 hdc=ide-scsi vga=794
initrd (hd1,5)/boot/initrd

title sles - suse linux enterprise server 9.0
kernel (hd0,9)/boot/vmlinuz root=/dev/hda10 vga=0x31a splash=silent
noresume
initrd (hd0,9)/boot/initrd

title slp - suse linux professional 9.2
kernel (hd1,6)/boot/vmlinuz root=/dev/hdb7 vga=0x31a noresume
initrd (hd1,6)/boot/initrd

title solaris 10
root (hd1,0)
makeactive
chainloader +1

title windows xp
root (hd0,0)
makeactive
chainloader +1

title jdsboot
kernel (hd0,10)/boot/vmlinuz root=/dev/hda11 hdc=ide-scsi vga=794
initrd (hd0,10)/boot/initrd

now let's say that all other systems (winxp, sol10, sles, slp) are ready and the boot menu is from jdsboot grub.


2.install captive for windows backup

to support NTFS write support, i installed Captive (http://www.jankratochvil.net/project/captive/) on slp.

How to install Captive on SUSE Linux professional 9.2?

download
http://www.jankratochvil.net/project...1.5-0.i386.rpm
http://www.jankratochvil.net/project...e-1.1.5.tar.gz
http://www.jankratochvil.net/project...aptive8.tar.gz

note that captive rpm works fine. Download source if you prefer. You do need to get lufs source.
rpm -ivh captive-static-1.1.5-0.i386.rpm
you then get ntfs driver from your system or from web by running
captive-install-acquire
then mount your windows
mount -t captive-lufs /dev/hda1 /windows/c
or simply
mount /dev/hda1 /windows/c
when you have entry somewhere already in previous step.

sure you will have problem. To resolve it, compile your kernel (so many doc on this).
For example, i run the following:
su root
uname -rm
make oldconfig
make all
drink coffee
make modules_install
make install # you may need to backup something now
# make clean
reboot

do a
su
tar zxf /tmp/lufs-0.9.7captive8.tar.gz
./configure;
make;
/usr/share/lufs/captive_modprobe
exit

and finally you are ready to use captive and write your ntfs by
su
mount -t captive-lufs /dev/hda1 /windows/c
exit

3.backup and recover linux

to backup linux os with your customization is really easy. I would suggest to use an external harddisk for this purpose. If not, have a big partition (such as using /dev/hdb2 in my example)

i will use /dev/sdc2 via a USB external hard disk for my backups.

The following will backup your linux parition jds (/dev/hdb6) when you are running slp
su
mount /dev/hdb6 /jds # (the parition to backup)
mount /dev/sdc2 /oss # (the external hard disk)
cd /jds
tar zcf /oss/jds.tar.gz .
cd ..
umount /jds
umount /oss
exit
# (you don't need to exclude anything as space is not a problem. Or you do)

The following will recover a linux operating system with your fully customized settings and user data – everything
su
mount /dev/hdb6 /jds # (the parition to backup)
mount /dev/sdc2 /oss # (the external hard disk)
cd /jds
rm -rf * # (if you didn't format, erase everything)
tar zxf /oss/sles.tar.gz .
cd ..
umount /jds
umount /oss
exit

and you are so happy that you followed me to get a recovered system within 10 minutes!

The whole cycle of backup and recovery takes half an hour or so. Note that once you recovered your jds system, do a
fdisk – l
to check for safety. If you noticed any changes which you wouldn't, modify your recovered jds system files (/etc/fstab and /boot/grub/menu.lst to allow it boots later). When this is the case, you may need to modify jdsboot's setting as well.

4.backup and recover windows

We now have captive running on slp. It's time to backup your windows. If you separated your data from your system, you only need to back system drive, generally speaking.

Note: all links to other windows drives, such as database files, your web sites, your personal info, etc, will get back once your system drive recovered (giving that no changes on those linked data on other drives, of course)

noted that captive-lufs doesn't support to read certain files (drivers i guess) such as IO.SYS, so mount as ntfs for read-only to do a backup first. Depending on your system, the size of your whole windows system drive will vary from 4 ~ 12 GB
su
mount -t ntfs /dev/hda1 /windows/c
mount /dev/sda2 /oss
cd /windows/c
tar zcf /oss/os/winxp.tar.gz . # (or 3 tarballs here)
# note: you do not want to back up your pagefile.sys
# note: it seemed that captive doesn't support writing files >1G in ntfs. My pagefile.sys is 1.5G and failed to be unzpacked later.
# note: it's wise to have 3 tarballs for your windows backup should you need to burn CD/DVD: one for WINDOWS folder; one for PROGRAM FILES folder; one for all other files.
# note: you may want to set recovery off in windows and remove all windows update uninstaller to speed up the recovery process.
cd ..
umount /windows/c
umount /oss
exit

Now the backup is done. I didn't do backups for other windows drives. Feel free to do it yourself and not explained here as example.

Let's start recovery – this is a bit complex, however. I am trying to find easier ways since i do not have a windows xp boot diskette set.

First, erase all files on /dev/hda1
unfortunately you can't do it within slp. Reboot the machine and use your windows XP installation CD/DVD to start the installation on the same partition (it is not necessary to be the same partition, in my opinion, guess who doesn't) and select new installation then a FAST format NTFS on the partition. Once done and windows tries to copy files, popup the CD and reboot.
Note: in my test somehow when i did a full format it failed the recovery later. Didn't try again. It saves time by quick format anyway.

When reboot, since the format changed MBR and now you need your linux installtion CD/DVD to boot to jdsboot now. Choose manual installtion then boot existing system and select /dev/hda11 (my jdsboot) you should now boot to jdsboot with no problem.

Login as root and run
/sbin/grub-install /dev/hda
reboot
will bring you back jdsboot grub menu erased by windows installation CD/DVD.
Note: you may want to check using fdisk -l. if you see any partition number changes, you may need to edit (remember i remind your favorite editor earlier?) some files.

Now you will boot to slp and start windows recovery.

Run the following in a sery to recover:

su
mount -t captive-ntfs /dev/hda1 /windows/c
mount /dev/sda2 /oss
cd /windows/c
rm -rf /windows/c/*
# (a few files may be copied already from windows installation CD/DVD)
tar zxf /oss/winxp.tzr.gz . 2>/dev/null
# speedup the process by not displaying file setting errors, for example, owner/group info
# note: when pagefile.sys is not recovered, you may manually create a 20M or so file in /windows/c. Copy any file will work
cd ..
umount /windows/c
umount /oss
exit

configurations!!! you just recovered your windows system with all your programs, files, and settings.

Now you back to windows and might note something different. For example, your recycle bin corrupts – who cares and windows will create it for you again (so for pagefile.sys as well).

The whole backup and recovery process takes less than 2 hours. Recovery itself takes 1 hour or so. (Does this have something to do with lufs-sandbox? but it's off by default)

I guess use floppy to format ntfs will be a bit simpler. Not tried yet. Since it says in some forum that ntfs version varies from windows XP to sp1 to sp2, definitely from 2000 to 2003, and someone says that captive doesn't support windows XP SP2 yet (which doesn't affect me somehow), you are on your own risk!

5.Comparison with partimage, dd, ghost, etc

(no intention on doing this)

This document is created using staroffice 7.0 update 4 in jds.
 
Old 03-22-2005, 02:20 AM   #4
gcclinux
Member
 
Registered: Oct 2004
Location: London, UK
Distribution: Suse 11.2
Posts: 78

Rep: Reputation: 15
Thumbs up

Hi shshjun

Fantastic HOW-TO I will try it myself in the next few days. The rpm package you provided here was it created by yourself? Do you have the rpm source package too?

King Regards,

Ricardo

Last edited by gcclinux; 03-22-2005 at 02:22 AM.
 
Old 03-23-2005, 09:17 PM   #5
shshjun
Member
 
Registered: Nov 2004
Location: del
Distribution: jds
Posts: 88

Original Poster
Rep: Reputation: 15
now install captive in jds is easily done. still no rpm made since i don't know how, but at least, i am happy with jds with this result.

install http://www.jankratochvil.net/project...aptive8.tar.gz by
./configure; make; make install; /usr/local/share/lufs/prepmod;
# this is to get lufs-captivefs ready
install http://www.jankratochvil.net/project...aptive2.tar.gz by
./configure; make; make install;
# this is to get gnome interface for captive-install-acquire. if you are ok with captive-cmdline, skip this
install http://www.jankratochvil.net/project...1.5-0.i386.rpm by
rpm -Uvh captive-static-1.1.5-0.i386.rpm
# if you have problem, install from source for captive as well (then do rpm, doesn't hurt)

and you are done.

run captive-install-acquire to get ntfs native driver from your windows and you are golden.

appreciate someone test this out or even make an rpm for jds.

thank you, shen

Last edited by shshjun; 03-28-2005 at 10:21 PM.
 
Old 03-27-2005, 10:21 AM   #6
johnnydangerous
Member
 
Registered: Jan 2005
Location: Sofia, Bulgaria
Distribution: Fedora Core 4 Rawhide
Posts: 431

Rep: Reputation: 30
[root@fbi ~]# /usr/share/lufs/captive-prepmod
+ /sbin/modprobe lufs 2>/dev/null
Preparing LUFS kernel module... Run /usr/share/lufs/prepmod if problems occur.
Running kernel version: 2.6.10-precompiled (base version 2.6.10)
Destination module directory: /lib/modules/2.6.10-precompiled/kernel/fs/lufs
Using kernel sources: /lib/modules/2.6.10-precompiled/build
+ set -e; /bin/mkdir -p `dirname /var/lib/lufs/lufs.ko`; /bin/rm -f /var/lib/lufs/lufs.ko; make -C /lib/modules/2.6.10-precompiled/build SUBDIRS="/usr/share/lufs/2.6" modules EXTRA_CFLAGS=""; /bin/mv -f /usr/share/lufs/2.6/lufs.ko /var/lib/lufs/lufs.ko; /bin/rm -f /usr/share/lufs/2.6/proc.o /usr/share/lufs/2.6/.proc.o.flags /usr/share/lufs/2.6/.proc.o.cmd /usr/share/lufs/2.6/inode.o /usr/share/lufs/2.6/.inode.o.flags /usr/share/lufs/2.6/.inode.o.cmd /usr/share/lufs/2.6/dir.o /usr/share/lufs/2.6/.dir.o.flags /usr/share/lufs/2.6/.dir.o.cmd /usr/share/lufs/2.6/file.o /usr/share/lufs/2.6/.file.o.flags /usr/share/lufs/2.6/.file.o.cmd /usr/share/lufs/2.6/symlink.o /usr/share/lufs/2.6/.symlink.o.flags /usr/share/lufs/2.6/.symlink.o.cmd /usr/share/lufs/2.6/lufs.mod.o /usr/share/lufs/2.6/.lufs.mod.o.flags /usr/share/lufs/2.6/.lufs.mod.o.cmd /usr/share/lufs/2.6/lufs.o /usr/share/lufs/2.6/.lufs.o.flags /usr/share/lufs/2.6/.lufs.o.cmd /usr/share/lufs/2.6/lufs.mod.c /usr/share/lufs/2.6/.lufs.ko.cmd;
make: Entering directory `/usr/src/redhat/BUILD/kernel-2.6.10/linux-2.6.10'
CC [M] /usr/share/lufs/2.6/dir.o
CC [M] /usr/share/lufs/2.6/file.o
CC [M] /usr/share/lufs/2.6/inode.o
CC [M] /usr/share/lufs/2.6/proc.o
CC [M] /usr/share/lufs/2.6/symlink.o
LD [M] /usr/share/lufs/2.6/lufs.o
Building modules, stage 2.
MODPOST
*** Warning: "kill_proc_info" [/usr/share/lufs/2.6/lufs.ko] undefined!
CC /usr/share/lufs/2.6/lufs.mod.o
LD [M] /usr/share/lufs/2.6/lufs.ko
make: Leaving directory `/usr/src/redhat/BUILD/kernel-2.6.10/linux-2.6.10'
+ /bin/rm -rf /lib/modules/2.6.10-precompiled/kernel/fs/lufs; /bin/mkdir -p /lib/modules/2.6.10-precompiled/kernel/fs/lufs; /bin/ln -s /var/lib/lufs/lufs.ko /lib/modules/2.6.10-precompiled/kernel/fs/lufs/lufs.ko
+ /sbin/rmmod lufs 2>/dev/null; /sbin/insmod /lib/modules/2.6.10-precompiled/kernel/fs/lufs/lufs.ko 2>/dev/null
Failed to prepare lufs.ko module for your Linux kernel 2.6.10-precompiled.
Detected Linux kernel sources "/lib/modules/2.6.10-precompiled/build" do not appear to be valid.
Please install kernel-source-x.y.z.i386.rpm or kernel-headers_x.y.z_i386.deb.
The following directory paths were search (first existing directory used):
/lib/modules/2.6.10-precompiled/build
/usr/src/kernel-headers-2.6.10-precompiled
/usr/src/linux-2.6.10-precompiled
/usr/src/linux-2.6.10
/usr/src/linux
/usr/src/kernel-source-2.6.10-precompiled
at /usr/share/lufs/captive-prepmod line 181

not good I did everything I don't want to make vfat

even without the procompiled kernel same result also somewhere was available at captive site a kernel patch for 2.6.10 is it necessary because when I tried to apply it process died

Last edited by johnnydangerous; 03-27-2005 at 10:23 AM.
 
Old 03-28-2005, 10:15 AM   #7
shshjun
Member
 
Registered: Nov 2004
Location: del
Distribution: jds
Posts: 88

Original Poster
Rep: Reputation: 15
yes, to make captive work is kind of tricky to me. my test is on suse 9.2 of kernal 2.6.9 and jds release ii of kernel 2.4.19.
seemed you already aware of posts about making source code changes for 2.6.10. i have no further suggestions except to compile your kernel or try jds out. below are links:
1. http://www.linuxforums.org/forum/topic-30578.html - a success story
2. http://www.knopper.net/knoppix/index-en.html - that knoppix comes with captive
3. http://www.oreillynet.com/pub/wlg/6261 - that issues with sp2 but seemed worked in my case

this doesn't help, i know and sorry, shen
 
Old 03-28-2005, 10:15 PM   #8
shshjun
Member
 
Registered: Nov 2004
Location: del
Distribution: jds
Posts: 88

Original Poster
Rep: Reputation: 15
i wanted to update all that i just recovered another windows xp sp2 using the method described here successfully. the amzing part is that it was backed up from AMD athlon 3200+ cpu then recovered to intel pentium 2.4G and it worked just fine. non devices are identical on both boxes. drivers are easily installed within 15 min thanks to hp's cental location (on recovery dvd i386/drv)

i got the warning that 'due to significant hardware changes', i have to re-activate windows within 3 days.

the whole write back process took less than 3 hours for 12GB while i was playing bridge.

this concludes my research in less than 2 weeks. shen

Last edited by shshjun; 03-28-2005 at 10:23 PM.
 
Old 03-31-2005, 01:55 PM   #9
Parley
LQ Newbie
 
Registered: Feb 2005
Location: Beaumont, CA
Distribution: Feather 0.7.2, Slackware 10.1, Vector SOHO, and growing
Posts: 19

Rep: Reputation: 0
Live CD

Hey is there a live CD that has all the tools on it necessary to do what you've described?

Basically I'd like to backup my winxp system and then restore it prior to installing linux. That way I can have an ultimate defrag in less time than it takes for MS defrag to run.

TIA

p.s. Great How-To by the way
 
Old 03-31-2005, 03:13 PM   #10
shshjun
Member
 
Registered: Nov 2004
Location: del
Distribution: jds
Posts: 88

Original Poster
Rep: Reputation: 15
1. http://iso.linuxquestions.org/version.php?version=44 - that an iso in lq
2. http://www.knopper.net/knoppix/index-en.html - that knoppix official with captive
i hope jds live cd contains this tool -- shen
 
Old 03-31-2005, 04:43 PM   #11
Parley
LQ Newbie
 
Registered: Feb 2005
Location: Beaumont, CA
Distribution: Feather 0.7.2, Slackware 10.1, Vector SOHO, and growing
Posts: 19

Rep: Reputation: 0
Duh!

I should have realized it would be that easy.
Thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Captive and Mandrake 10.1 fatenabu Linux - Software 1 12-03-2006 06:30 PM
Anyone use captive-ntfs? bosewicht Linux - Newbie 1 06-03-2005 05:16 AM
Captive and 2.6.10 10xOXR Linux - Newbie 4 01-28-2005 10:04 AM
captive Problem.. :( k0ljat Linux - Software 2 11-19-2004 06:06 PM
anyone using Captive NTFS? grapier Linux - General 0 01-16-2004 03:51 AM


All times are GMT -5. The time now is 07:41 AM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration