Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
|
07-10-2003, 07:02 PM
|
#1
|
Member
Registered: Apr 2003
Location: Hermitage, TN; United States
Distribution: Debian, CentOS, and openSuSE
Posts: 41
Rep:
|
Backing Up Linux to 'dev/hde' (on IDE 3)
Hello, everyone.
I admit that I have been "living dangerously," not making system backups. I want to start making backups as soon as possible. (I am running SuSE Linux 8.2 Professional, incidentally.)
I am in the process of doing Google/Linux searches for free (GPL) Linux backup utilities, preferably a utility that supports compression and will (must) back up to a hard drive.
My Linux installation is on a 60-GB hard drive, but most of the drive is free, and I would like to back Linux up to a 30-GB hard drive, which is also where I back up my two Windows installations. I do not know if the 30-GB drive, even with compression, will provide enough room, nor do I know how to determine if it will.
The 30-GB drive is '/dev/hde' and it is connected to IDE 3. I have RAID enabled in order to use IDE 3, the only reason I am using RAID; I have had no problems, despite the fact that my boot loader is GRUB, SuSE's default boot loader.
A couple of weeks ago, I installed a security kernel update via SuSE's YOU software. The next time that I booted into Linux after that update, it detected '/dev/hde', but it "wanted" to reformat the drive which is 'vfat'; I replied no to the request. My two other Windows drives are 'vfat' (no NTFS) and they mount on my Linux desktop with no problem, and without any "desire" by Linux to reformat them. (Windows, however, cannot "see" the Linux drive, which is hidden by PartitionMagic 8.)
Below is a copy of my 'fstab' file. As you can see, '/dev/hde' is not present.
Code:
dev/hdb2 / reiserfs defaults 1 1
/dev/hda1 /windows/C vfat users,gid=users,umask=0002$
/dev/hda2 /windows/D vfat users,gid=users,umask=0002$
/dev/hdb1 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
Can I add '/dev/hde' to 'fstab' with the following additional line?
Code:
/dev/hde /windows/? vfat users,gid=users,umask=0002$
(The drive has no Windows/DOS letter, because it is being used as a logical device. I make Windows backups to it using Drive Image 2002.)
I was contemplating creating an EXT2 (or EXT3?) partition on '/dev/hde' to create space for Linux backups, but I fear that this step could cause problems with Windows. As I say, I currently use PartitionMagic 8 to multi-boot the system, and the Linux drive ('dev/hdb') is hidden from Windows by PartitionMagic. I assume that I could hide a new EXT2 partition on '/dev/hde' with PartitionMagic (after backup up both Windows installations, of course); I need to review the PartitionMagic documentation.
Does this approach seem like a logical one? (I still need to find backup software for Linux, of course.)
I assume that the alternative is to use Drive Image 2002 to back up the Linux installation, except for the swap partition? I will read the Drive Image documentation carefully to make sure that this method of backup would work smoothly and safely. I am concerned, however, that Drive Image will need to back up Linux to a 'vfat' partition, because it is a Windows utility, although it is supposed to support Linux partitions.
I would appreciate any advice, particularly from individuals who may have a similar system setup. I definitely need to back up to a hard drive, because I do not have a tape drive, and backing up to CD-ROM would be very time consuming and labor intensive.
I appreciate your taking the time to read this very long message!
I thank you, in advance, for your time, patience, and assistance!
Cordially,
David
--
http://ddickerson.igc.org/
P.S. -- I will continue to research the points that I have mentioned in this message, putting forth the effort to try to solve the problem myself. Per the guidelines of this forum, I would not post a request for help unless I were performing ongoing research to try to resolve this issue by myself.
|
|
|
07-10-2003, 07:20 PM
|
#2
|
Senior Member
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,305
Rep:
|
i really like dar. it has features like dump, but you're not
stuck using a particular filesystem.
it also uses blocking, so you don't lose everything after
a file error like you do with tar.
|
|
|
07-10-2003, 11:36 PM
|
#3
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
Wow, great effort in your post
A few things:
* hde is only the drive, you'll need to specify partitions on the drive. If there are none, you can create them with fdisk of cfdisk. Then you can format them using whatever filesystems you choose, check out:
man mkfs
Should you decide to use ext3:
mke2fs -j /dev/hdeX
where X is the partition that you created using fdisk.
* Backup utility I've found MOST useful for me was partimage. It's an excellent tool, it backups only the used space (6 GB total, 3 Free only 3GB will be made into an image) and it will break it up into chunks (say, 690MB ) along with bz2 compression. www.partimage.org
Cool
|
|
|
07-11-2003, 12:14 AM
|
#4
|
Senior Member
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,305
Rep:
|
it's extra effort learning to use a backup tool, but it's
much more efficient to use one that will do incremental
backups.
like this.
full backup first day of month. then the first week, just
backup the files that are changed each day. most backup
software can do that. each week, backup changes
from the first of the month. dump does it like this:
you do a 0 level dump which is a full backup, then
if you do a 1 level dump the next day, then 2 the next,
each higher number dump level only backs up the
changes since the most recent lower number.
it's common to do them like this. 0,2,1,4,3,6,5.
then you only need 3 restores to get the fielsystem
to a certain state.
I've been using dar for a while now, and with it, you
refer to a specific backup file, and the current filesystem
is compared to that backup, and the changed files are
saved.
it's just a lot safer because sometimes you mess
something up, and it takes a while for you to notice.
if you only have the full backups, and you are
overwriting the old ones, you won't be able to go back
nearly as far to restore stuff.
for dar, you would start in the root of what you
want to backup,
dar -z3 -v -s 700M -c /mnt/hde1/hda1-july10 -A /mnt/hde1/hda1-july1
that would create a backup with the name hda1-july10.dar with the changes to the current
filesystem since the backup hda1-july1.dar
|
|
|
07-11-2003, 04:17 PM
|
#5
|
Member
Registered: Apr 2003
Location: Hermitage, TN; United States
Distribution: Debian, CentOS, and openSuSE
Posts: 41
Original Poster
Rep:
|
Backing Up Linux to 'dev/hde' (on IDE 3)
Hello, everyone.
Thanks for the advice about backup up Linux.
I have checked the PartImage Web page and I am impressed.
I am still concerned about the size of the backup, because my backup drive is 30 GB and my Linux drive is 60 GB. PartImage, however, would help me save disk space: "For speed and efficiency, free blocks are not written to the image file. This is unlike the 'dd' command, which also copies empty blocks." In addition, I would use maximum compression.
I need to be able to mount '/dev/hde'. MasterC is correct, however, that I am not specifying a partition. The drive is 'vfat' and is a single partition. Should I specify it as '/dev/hde1' in 'fstab'?
Incidentally, I have found at least one utility that will clean up files wasting disk space, such as old object (.o) files. What experience have people had with such utilities?
Finally, I should be able to use PowerQuest's Drive Image 2002 to back up Linux to the drive on IDE 3, but I have to upgrade to Drive Image 7 in order to avoid copying free blocks to the backup image file, and I really do not want to spend money on Windows-based proprietary software.
First and foremost, however, I need to add the 30-GB drive to 'fstab' and get Linux to mount it on startup. I would appreciate suggestions about the partition issue I mention earlier in this message.
Thanks!
Cordially,
David
--
http://ddickerson.igc.org/
P.S. -- Based upon PartImage's Web site, I can back up Linux to a 'vfat' drive, correct?
|
|
|
07-11-2003, 05:00 PM
|
#6
|
Member
Registered: Apr 2003
Location: Hermitage, TN; United States
Distribution: Debian, CentOS, and openSuSE
Posts: 41
Original Poster
Rep:
|
Backing Up Linux to 'dev/hde' (on IDE 3)
Hello, everyone.
Incidentally, the disk-cleaning utility to which I referred in an earlier message in this thread is Kleandisk.
The last non-beta release was version 2.0 in March 2001. The most recent beta release was March 2002.
Thanks!
Cordially,
David
--
http://ddickerson.igc.org/
|
|
|
07-11-2003, 06:52 PM
|
#7
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
I've personally never had the need/desire to remove loose strings from around the system. I clean out /tmp and that's about the extent.
As for whether to ad the 1 or not, you can view the structure of the disk with:
fdisk -l /dev/hde
And it will display the partition information. If there truly is only 1, and it's the primary partition (1) then, yep. However if it was created as an extended/logicial partition you will see that there as well, and should then use the 5,6 or so on number that it corresponds to. Simply take a gander at the partition with the largest number blocks, that's the one you want
Cool
|
|
|
07-11-2003, 08:57 PM
|
#8
|
Senior Member
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,305
Rep:
|
you can make the free space on the drive extremely
compressable with
dd if=/dev/zero of=filler bs=1M
rm filler
that will make the empty space on the drive all zero's
so that a partition imager that didn't understand the
filesystem could compress it.
|
|
|
07-12-2003, 05:45 PM
|
#9
|
Member
Registered: Apr 2003
Location: Hermitage, TN; United States
Distribution: Debian, CentOS, and openSuSE
Posts: 41
Original Poster
Rep:
|
Backing Up Linux to 'dev/hde' (on IDE 3)
Hello, MasterC.
Thank you for your message.
Do you clean out '/tmp' manually, simply by deleting all of the files there?
The information I get from 'fdisk' is as follows:
Code:
linux:/home/ddickerson # fdisk -l /dev/hde
Disk /dev/hde: 30.0 GB, 30020272128 bytes
255 heads, 63 sectors/track, 3649 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hde1 1 3649 29310561 1c Hidden Win95 FAT32 (LBA)
I assume that adding the drive to 'fstab' will remove the "Hidden" status after I reboot and run 'fdisk -l /dev/hde' again.
Therefore, I assume that the appropriate response to your statement, "If there truly is only 1, and it's the primary partition (1) then, yep," is that I should specify the partition as 'hde1'?
Because the drive has no DOS letter specification, I assume that it is a logical partition. Can I specify it in 'fstab' without a drive letter, as follows?
Code:
/dev/hde1 /windows vfat users,gid=users,umask=0002$
Finally, I recall reading somewhere that I should leave a blank line at the end of 'fstab' or I will get an error upon booting into Linux. (I have no idea of the source of this tip or why I even remember it!)
Thank you very much, MasterC!
Cordially,
David
--
http://ddickerson.igc.org/
Quote:
Originally posted by MasterC
I've personally never had the need/desire to remove loose strings from around the system. I clean out /tmp and that's about the extent.
As for whether to ad the 1 or not, you can view the structure of the disk with:
fdisk -l /dev/hde
And it will display the partition information. If there truly is only 1, and it's the primary partition (1) then, yep. However if it was created as an extended/logicial partition you will see that there as well, and should then use the 5,6 or so on number that it corresponds to. Simply take a gander at the partition with the largest number blocks, that's the one you want
Cool
|
Last edited by DavidMD; 07-12-2003 at 05:47 PM.
|
|
|
07-12-2003, 05:50 PM
|
#10
|
Member
Registered: Apr 2003
Location: Hermitage, TN; United States
Distribution: Debian, CentOS, and openSuSE
Posts: 41
Original Poster
Rep:
|
Backing Up Linux to 'dev/hde' (on IDE 3)
Hello, whansard.
Thank you very much for the valuable tip!
Cordially,
David
--
http://ddickerson.igc.org/
Quote:
Originally posted by whansard
you can make the free space on the drive extremely
compressable with
dd if=/dev/zero of=filler bs=1M
rm filler
that will make the empty space on the drive all zero's
so that a partition imager that didn't understand the
filesystem could compress it.
|
|
|
|
07-12-2003, 07:03 PM
|
#11
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
Yes, I manually delete it:
rm /tmp/*
Be weary of how you do this, you could delete /tmp If you do, remember to re-create it with the same permissions it had to begin with. Also, I drop back to init1 when I do that, just to ensure nothing is writing to /tmp:
telinit 1
As for the hidden, I wish I knew why that was there. Someone with more knowledge on the subject will hopefully chime in (whansard?) and tell you what the hidden means. In any case, yes, if you place that line in your fstab then upon reboot you should see it, however you don't have to reboot for changes to take effect:
mount -a
Will mount up everything in your fstab.
1 more thing, that $ on the end of your fstab line, remove that (unless you have some odd reason for it? ) and replace it with 2 zeros sepeated by a space:
0 0
HTH
Cool
|
|
|
07-12-2003, 08:18 PM
|
#12
|
Senior Member
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,305
Rep:
|
i didn't want to post cause my number of posts was
1337, and i wanted to leave it that way for a few days,
but i can't take it. i have to answer.
partition magic makes primary partitions of that type,
cause microsoft says there can't be more than 1
primary partition on a computer. when you make a
primary, it makes it hidden, then you have to unhide it.
the type 1c is just a partition entry that will be ignored by
windows. PM has another menu entry that says,
"unhide partition", but the easy way is just to use
fdisk /dev/hde
t
1
c
w
i think
and that changes your type 1c partition to c, which is
a normal fat32.
you would have been able to mount the partition in
linux with it either way, but you wouldn't be able to view
the partition in windows the way it is.
Last edited by whansard; 07-12-2003 at 08:19 PM.
|
|
|
07-12-2003, 08:28 PM
|
#13
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
1337
I knew that you'd know! What is the point of having only 1 primary partition?
Cool
|
|
|
07-12-2003, 08:52 PM
|
#14
|
Senior Member
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,305
Rep:
|
it's microsoft madness, and really old too. there used
to be docs around about how more than 1 primary
is "unsupported", and how you could get system crashes
if you make more than 1 primary. the windows/dos fdisk
will not let you make a primary partition if one already
exists because of that. i started putting 3 or 4 primary's
on my hard drive back 10 or 11 years ago, and there was
no partition magic. i used dos fdisk and created an
extended partition, then started norton diskeditor, and
changed the type from 05 to 06, then rebooted and
formatted it. that way i could have a few versions of
dos on my machine.
anyway, in the old days, and still today even maybe,
some apps would crash or corrupt your hard drive, if
you had more than one primary partition. MS didn't
want to bother fixing it's errors there, cause you don't
need more than 1 primary to have your 1 copy of dos
or windows on the machine.
|
|
|
07-14-2003, 09:37 AM
|
#15
|
Member
Registered: Apr 2003
Location: Hermitage, TN; United States
Distribution: Debian, CentOS, and openSuSE
Posts: 41
Original Poster
Rep:
|
Backing Up Linux to 'dev/hde' (on IDE 3)
Hi, MasterC.
Thank you for the tip on cleaning out '/tmp'/. I will exercise due care!
The hidden attribute is a function of PartitionMagic. I have a primary and a logical partition on '/dev/hda'. The primary partition contains Win2k Pro, and the PowerQuest utilities, and it can "see" '/dev/hde'; I run my backups from Win2k Pro.
The secondary partition contains WinXP Pro, which cannot "see" '/dev/hde', although I have repeatedly deselected the hidden attribute in PartitionMagic so that WinXP Pro can access it -- a capability that I want very much, but which PartitionMagic denies, for a good reason, I assume.
> ...that $ on the end of your fstab line, remove that....
When I installed SuSE Linux 8.2 Professional, MasterC, it set up 'fstab' as I have shared it in this thread, with the dollar sign. I do not know why the dollar sign is there, but I assume that SuSE had a reason for having YaST2 set up 'fstab' in that particular manner.
How critical is it that I make that change? Are you suggesting that I make it for all of 'fstab' or just the line for '/dev/hde'? I realize, of course, that distribution-specific utilities are far from perfect, but SuSE Linux has been rock solid with this exact 'fstab' configuration.
Finally, MasterC, what is the signifigance of the two zeros separated by a space? What exactly do the two zeros mean? Do you happen to know what the dollar sign means in my current 'fstab', MasterC?
I apologize for the additional questions, but I am truly a Linux neophyte ("newbie") and I am extremely cautious.
Thank you very much!
Cordially,
David
--
http://ddickerson.igc.org/
P.S. -- For the sake of being thorough, I will read more on the details of 'fstab' and its configuration.
Quote:
Originally posted by MasterC
Yes, I manually delete it:
rm /tmp/*
Be weary of how you do this, you could delete /tmp If you do, remember to re-create it with the same permissions it had to begin with. Also, I drop back to init1 when I do that, just to ensure nothing is writing to /tmp:
telinit 1
As for the hidden, I wish I knew why that was there. Someone with more knowledge on the subject will hopefully chime in (whansard?) and tell you what the hidden means. In any case, yes, if you place that line in your fstab then upon reboot you should see it, however you don't have to reboot for changes to take effect:
mount -a
Will mount up everything in your fstab.
1 more thing, that $ on the end of your fstab line, remove that (unless you have some odd reason for it? ) and replace it with 2 zeros sepeated by a space:
0 0
HTH
Cool
|
|
|
|
All times are GMT -5. The time now is 03:02 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|