Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
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.
|
 |
09-03-2005, 05:22 AM
|
#1
|
Member
Registered: Apr 2004
Posts: 397
Rep:
|
zip & unzip
Hi
env:
pentium II with two hard disk.
hda installed windows98
hdb installed mandrake 10.1 (windows files mounted in /mnt/windows)
dual boot with lilo
Prb
use zip & unzip command from the linux partition to compress files of the windows partition.
example:
i create in windows98 a directory containing two *.txt files...
the first is normal,the second has the hide attribute.
i'm able to Zip from linux using the
zip -rk destination_file Source_directory
i'm able to unzip back to a win98 directory using:
unzip zipped_file -d destination_directory
but when i load again win98 the hidden file loose his attribute and now is visible....
i tried also with ark but unsuccesfully...
i'm using zip and unzip to ensure compatibility to win *.zip file format....
how to preserve the win98 files attribute in the zip/unzip process ?
thanks in advance
Maurizio
|
|
|
09-03-2005, 06:44 AM
|
#2
|
Member
Registered: Aug 2005
Location: Ukraine
Distribution: Ubuntu 9.04
Posts: 99
Rep:
|
Look at the rights of your hidden file under linux - they will be the same as the not hidden one. The same is for the attributes. If you need to somehow hide the file then you rename it to "dotfile" - ".hidden.txt" . Then the application decide whether to show this file or not.
The ability to hide file is built into the Windows filesystems and is not supported by Linux.
For Linux all Windows files would be equal except ones who have 'read-only' mode.
|
|
|
09-03-2005, 08:23 AM
|
#3
|
Senior Member
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537
Rep:
|
Yes thats correct posted above windows uses the h permission to denote hidden status for files this currently is not supported by the file system driver in linux as its just a stupid option anyway. Making a file hidden does nothing but prevent stupid windows users from modifying system files that they shouldent mess with. Bad thing about windows 98 is there is no security in the file system what so ever. so a hidden file still can be modifyed by any user on the system.
|
|
|
09-03-2005, 11:32 AM
|
#4
|
Member
Registered: Apr 2004
Posts: 397
Original Poster
Rep:
|
Hi
thanks for the answer.
i opend the topic because i planned to use zip or other compress utilities to fully
backup the windows partition.
i know windows function pefectly also if this files are visible..
So if the file system drive in linux do not support this,there are no other product that permit to do the work.....
sob....
Maurizio
|
|
|
09-03-2005, 01:35 PM
|
#5
|
Member
Registered: Aug 2005
Location: Ukraine
Distribution: Ubuntu 9.04
Posts: 99
Rep:
|
Nevertheless you can create images of the filesystems if you have enough space for backups  in case you need to backup a complete disk.
[ Update ]
I mean
Code:
cat /dev/hdaX | bzip2 -9 > my_disk_backup.bz2
and later if something goes completely wrong:
Code:
bzcat my_disk_backup.bz2 > /dev/hdaX
Last edited by rtg; 09-03-2005 at 01:56 PM.
|
|
|
09-04-2005, 11:29 AM
|
#6
|
Member
Registered: Apr 2004
Posts: 397
Original Poster
Rep:
|
Hi
thanks..i will try the suggested command as
soon as possible and i will provide a feedback
Maurizio
|
|
|
09-05-2005, 11:53 AM
|
#7
|
Member
Registered: Apr 2004
Posts: 397
Original Poster
Rep:
|
Hi rtg
i launched the command you suggested.
i modify it because...
dev Hda contains only partition hda1 (win98)
so i changed the command with
cat dev/hda and i added the verbose parameter to see output progress.
i need another explanation...
i have the sensation this command save
physically all the bytes written to disk...
(the partition table is written to hda)
if the above is true what happens if i will
restore to a disk of different size ?
example hda is 1,8 gb but win 98 libraries are only 400 mb large..
if i restore to an hda of 800 mb ?
the program do not complete but the libraries are however full restored ?
thanks in advance
Maurizio
|
|
|
09-06-2005, 01:08 PM
|
#8
|
Member
Registered: Aug 2005
Location: Ukraine
Distribution: Ubuntu 9.04
Posts: 99
Rep:
|
There will be lots of problems when you try to unpack to the disk which capacity is smaller. The whole image is dumped with all the fragmentation and so on. (If you write it uncompressed you will even be able to mount it as a loopback device  - liked to do so some time in the past).
However, it can be fixed with Partition Magick or (I am not quite sure as used not very often) PartEd. THese tools will help you to shrink or grow the written filesystem.
|
|
|
09-06-2005, 01:38 PM
|
#9
|
LQ Sage
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,675
Rep: 
|
IMHO Partimage is best tool for this particular job.
|
|
|
09-06-2005, 02:37 PM
|
#10
|
Member
Registered: Apr 2004
Posts: 397
Original Poster
Rep:
|
Hi
if yoou want to laugh.....
i'm not anglo-saxon,i'm italian,so i first done
an internet search about IMHO product
to realize only it is an achronim for
In My Humble Opinion
i learned another thing.....
however i take a look to Partimage,now i will
search an rpm version hoping that it has not so many dependencies...
thanks for the answers....both to rtg and emerson
Maurizio
|
|
|
09-07-2005, 07:16 AM
|
#11
|
Member
Registered: Apr 2004
Posts: 397
Original Poster
Rep:
|
Hi
i installed partimage and it easily backup the partition....but looking at the document it seems to do not backup the MBR
i'm working with this config....
dev hda
contains partition hda1 = win98
dev hdb
contains partition linux + swap
boot loader is lilo
lilo is written to hda MBR
partition table is written to hda
i writed also lilo on floppy disk and i verify
that it loads....
now the problem is the partion table.....
does writing lilo to floppy disk also the partition table is copied.....?
thanks
Maurizio
|
|
|
09-07-2005, 08:57 AM
|
#12
|
Member
Registered: Aug 2005
Location: Ukraine
Distribution: Ubuntu 9.04
Posts: 99
Rep:
|
Quote:
The partition to restore must have the same size as the saved partition. If the partition is smaller than the original one, the operation will fail. If it is bigger, space can be lost. You can read the FAQ of this handbook, for more details about this
|
- That's from partimage docs. The problem of non-matching size still exists. The FAT must be extended to make sure that new files will have some space for their metatdata to be stored in the File allocation table. So all the following data should be moved further.
Partimage does not store the partition table because it back ups not the whole drive, but only one partition.
---
Recently I made a backup of one fellow's HDD with FAT32 on it by mounting it and copying the data. He studies Japaneese and used Japan characters to name the files. The names were lost (erm. I could see the '??????.doc' but FAT refuses such a masked filename') and some Ukrainian letters 'i,ji,je' (we've got these  ) were swapped by '?'. What is the right way to back up - use Unicode charset in the system? Only to backup something...
|
|
|
09-07-2005, 07:51 PM
|
#13
|
LQ Sage
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,675
Rep: 
|
Quote:
Originally posted by bong.mau
now the problem is the partion table.....
|
'dd' is a very powerful tool. You can use it to back up your entire disk or just the partition table.
Code:
dd if=/dev/hda of=/path_to_a_writable_device/mbr-backup bs=512 count=1
This will back up your mbr. You can increase the count as needed.
|
|
|
09-09-2005, 07:18 PM
|
#14
|
Senior Member
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537
Rep:
|
actually if you want to resize a disk image that is formated in e2fs or e3fs you can use resize2fs and any parttioning software.
this of course has nothing to do with backing up just resizeing.
you can remove the fragmentation and other stuff with chk2fs -f as well
|
|
|
All times are GMT -5. The time now is 02:17 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
|
|