Date: Mon, 12 Aug 2002 13:05:50 -0700 From: richard childers <fscked@pacbell.net> To: pg@eth1.com Cc: freebsd-mobile@freebsd.org Subject: Re: dumping entire ide laptop disk Message-ID: <3D58151E.62D3D51C@pacbell.net> References: <20020812182323.53681.qmail@web9705.mail.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Peter Gatsoulis writes: "... some of the fs are not Unix filesystems but MS DOS and NTFS does dump work with non-unix fs'es?" No, dump only understands the UNIX 4.2 Fast File System and derivatives. (Looks for entry-level page describing FAT filesystem and permutations ...) A good place to start: http://www.systweak.com/fat32/fat12.htm Some sales literature that touches on how many friggin' filesystems there are: http://www.webfs.com/shared/papers/gfss_paper.pdf How I found these two gems: http://www.google.com/search?hl=en&lr=&ie=ISO-8859-1&q=FAT+FAT32+NTFS+UFS+differences "if i want to dump ALL the partitions into 1 file per disk, without mounting each disk? is this possible?" Theoretically, yes; as you noted, you could use dd(1) to dump a raw image of the partition. It's not clear if that data, when restored to another partition, would be usable ... and note that there are no error detection mechanisms in dd(1), so you could easily copy a bad block, as is, and not record the information which elsewhere noted that this was a bad block - for instance. Basically, you can think of backups as available at a variety of granularities. You can operate upon simple files (IE, 'cp file file.BAK'), or you can operate upon entire directories of files (IE, 'tar cvf /tmp/foo.tar /my/dir/'), or you can operate upon entire filesystems (IE, 'dump 0f /dev/rmt8 /dev/sd0a'), or you can operate upon raw partitions (IE, 'dd if=/dev/sd0a of=/dev/sd1a bs=512b'). Some of these methods add more value than others - at the high end, dump(8) preserves inode information so that a carefully crafted filesystem with special inode characteristics can be preserved and restored ... at the low end, dd(1) just reads and writes bytes and does some optional operations on them, en passant. dd(1) is so non-discriminatory that it *could* be used to back up NT partitions. Sure, you also *could* use it to back up raw Oracle partitions. But why, when there are perfectly good utilities that do a better job and add more value? I would strongly recommend using native utilities to copy your installations and not assume that you can move Windows installations about, willy-nilly. Registry entries on PCs running Windows, detailing every little device driver and interrupt, make it very hard to achieve true portability between machines ... never mind portability of filesystems under those Windows operating systems. You may want to look into using some sort of ZIP utility to make an archive of your Windows installations, and use a Samba server as a temporary holding place for those ZIP files while you are rebuilding your machine; this would give you the backups you desire, along with error-checking and considerable flexibility in terms of what you restore. "as it is now, i am NOT mounting the disk, and i have tried listing the partitions in many ways, /dev/ad3s1, /dev/ad3s1a, /dev/rad3s1e etc .. what would be correct syntax? if this is not?" Lacking more information or a proper listing of all the relevant device entries you have before you it is hard to guess. However, I seem to recall, when I was experimenting with FreeBSD's capacity to mount DOS and NTFS filesystems (note that I mounted them read-only, and I suggest this to everyone - why do you NEED to write to your idle NTFS partition, no, of course, you don't, you just need to read or copy something, right?), that the 'D' partition was reserved for DOS. Have you tried mounting /dev/ad3s1d, ad3s2e, ad3s3e? A better description of the exact disk, its exact physical geometry, and how it's been sliced would be useful; personally, I always dedicate my entire drive to FreeBSD, these days (easier to carry two laptops, you'll probably need access to them both at the same time anyway), and so my understanding of slicing is a bit fuzzy. -- richard c/o Peter Gatsoulis wrote: > Thank you but some > > of the fs are not Unix filesystems but MS DOS and NTFS > does dump work with non-unix fs'es? > > if i want to dump ALL the partitions into 1 file per > disk, without mounting each disk? is this possible? > > as it is now, i am NOT mounting the disk, and i have > tried listing the partitions in many ways, /dev/ad3s1, > /dev/ad3s1a, /dev/rad3s1e etc .. > what would be correct syntax? if this is not? > thanx > --- richard childers <fscked@pacbell.net> wrote: > > Peter Gatsoulis writes: > > > > "i remove the drives and mount them in a desktop by > > using a 2.5"-3.5" IDE adapter, the desktop boots > > fine > > and reckognizes the new drive as ad3 > > > > "i now try; > > dump 0f - /dev/ad3 |bzip2 > > -c>/somemountpoint/somefile > > > > "i get, "bad sblock magic number" and entire dump > > aborts." > > > > I would try to mount the filesystem and run 'fsck > > -p' on it first before > > I would dump it. This would insure that you had the > > correct device name, > > if you were able to fsck or mount the filesystem. > > > > That having been said, note that the first example > > you cite refers to a > > "/", IE, dump(8) infers the device name from the > > mount point. If it is > > not mounted, you need to supply the correct device > > explicitly, and > > "/dev/ad3" is insufficient. > > > > In the past when I have had to recover trashed UNIX > > boxes where the > > /etc/fstab has been lost or mangled, I have found it > > useful to do > > something like: > > > > # /bin/csh > > # foreach dev ( `ls /dev/*sd*` ) > > ? echo "${dev}" > > ? echo "" > > ? fsck -n ${dev} > > ? echo "" > > end > > > > ... and in this way, one can quickly identify which > > /dev entries > > correspond to file systems (and perhaps even learn > > where they were last > > mounted :-). > > > > Hope this helps. > > > > > > -- richard > > > > c/o Peter Gatsoulis wrote: > > > > > hello & pls Help .? > > > > > > In the past w/ help from this list's members the > > > following has worked GREAT: > > > (using FBSD 4.5 but works w/ all FBSD versions) > > > > > > dump -0 -f - /|bzip2 -c>/mnt/where-ever/foo.dump > > > > > > used this continuosly to backup filesystems, but > > NOW i > > > have some laptop drives w/ mixed fs, ie: 1st > > partition > > > can be MS DOS, 2nd partition can be NTFS, 3rd > > > partition can be ufs w/ softupdates. > > > > > > i remove the drives and mount them in a desktop by > > > using a 2.5"-3.5" IDE adapter, the desktop boots > > fine > > > and reckognizes the new drive as ad3 > > > > > > i now try; > > > dump 0f - /dev/ad3 |bzip2 > > -c>/somemountpoint/somefile > > > > > > i get, "bad sblock magic number" and entire dump > > > aborts. > > > > > > reading the FBSD handbook, dump manpage and > > searching > > > the archives leads me to believe that dump can > > indeed > > > backup entire disks, irrespective of which fs is > > on > > > disk??? > > > > > > i've tried specifying ad3s1, ad3s1a, rad3s1e etc, > > many > > > variations of specifying device name BUT same > > > results.. > > > > > > how can i use dump to "snap" the entire disk > > image? > > > don't want to use dd in case i have to restore to > > > another diffrent laptop & drive ... > > > > > > __________________________________________________ > > > Do You Yahoo!? > > > HotJobs - Search Thousands of New Jobs > > > http://www.hotjobs.com > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > > with "unsubscribe freebsd-mobile" in the body of > > the message > > > > -- > > > > Richard A Childers/KG6HAC -- Senor UNIX System & > > Network Administrator > > "Dont forget nothing." Maj Rogers, standing orders, > > 1st Ranger Bn, 1759 > > > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-mobile" in the body of the message > > __________________________________________________ > Do You Yahoo!? > HotJobs - Search Thousands of New Jobs > http://www.hotjobs.com -- Richard A Childers/KG6HAC -- Senor UNIX System & Network Administrator "Dont forget nothing." Maj Rogers, standing orders, 1st Ranger Bn, 1759 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D58151E.62D3D51C>