vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi u all, Does anybody know the best way ( the more simple and.....the faster copy all my linux, except boot partition, to a new hard disk ? My PC is like that : - primary master -> 200 Go ( grub+Windows XP !) - secondary master -> 40 Go ( linux gentoo on several partitions "/" "/home" etc..) I'd like to change this 2nd HD wich is becoming very slow, and.... narrow .. The new one will be at least 80 Go, but I can create the same partitions I've on my Linux HD. The question is : wich is the safest way replace the disk, and start with a working linux ? thanks in advance, cu, jf |
| |||
| On Saturday 06 May 2006 10:09, jf stood up and spoke the following words to the masses in /alt.os.linux.gentoo...:/ > Hi u all, > > Does anybody know the best way ( the more simple and.....the faster > ) to copy all my linux, except boot partition, to a new hard disk ? > My PC is like that : > > - primary master -> 200 Go ( grub+Windows XP !) > - secondary master -> 40 Go ( linux gentoo on several partitions "/" > "/home" etc..) > > I'd like to change this 2nd HD wich is becoming very slow, and.... > narrow > . The new one will be at least 80 Go, but I can create the same > partitions I've on my Linux HD. > The question is : wich is the safest way replace the disk, and start > with a working linux ? It may not be what you really want, but the best approach - at least, in my opinion - would be to install the new disk while the old one is still in place and use /dd/ - see the /man/ page - to copy the entire disk onto the new one in one go. This will include the partition table and all filesystems as it's a low-level copy, similar to what a Norton Ghost would do - or so I'm told, I've never used Norton Ghost and I don't have any Windows on my machine. After the copy, you remove the old disk and you put the new one on the same controller and channel - e.g. secondary master or primary slave - where the other one does. That way, your */etc/fstab* and GRUB entries will still be correct. You will of course have 40 GB of unused space on that disk after the copy. Hope this was helpful... ;-) -- With kind regards, *Aragorn* (Registered GNU/Linux user # 223157) |
| |||
| On Sunday 07 May 2006 01:38, I stood up and spoke the following words to the masses in /alt.os.linux.gentoo...:/ > [...] > > After the copy, you remove the old disk and you put the new one on the > same controller and channel - e.g. secondary master or primary slave - > where the other one does. [...] That should of course read "... on the same controller where the other one used to be". Sorry for my butterfingering - it's getting late over here... ;-) -- With kind regards, *Aragorn* (Registered GNU/Linux user # 223157) |
| |||
| jf <cestpasjihef@free.fr> wrote: > Hi u all, > > Does anybody know the best way ( the more simple and.....the faster > > My PC is like that : > > - primary master -> 200 Go ( grub+Windows XP !) > - secondary master -> 40 Go ( linux gentoo on several partitions "/" > "/home" etc..) > > I'd like to change this 2nd HD wich is becoming very slow, and.... > narrow > same partitions I've on my Linux HD. > The question is : wich is the safest way replace the disk, and start > with a working linux ? If you use dd, like Aragorn recommended, you won't be able to increase more than the last partition of your disk (if the file system supports growing, that is). So no, since you have several partitions, I wouldn't recommend that. Add the new disk, partition it with the partitions in the same order as your original disk, boot to a liveCD, and mount both the old and new partitions. What kind of file system? If ext2/3 or xfs, you can use dump/restore or xfsdump/xfsrestore to copy the files over and still retain all attributes, special files, quotas, streams and everything else. For xfs, the following should work: xfsdump -J - /old | xfsrestore -J - /new If using reiserfs, there's no dump utility (among the plethora of missing things which makes it my least favourite file system), and you can't do much better than a tar through a pipe: cd /old && tar cpf - . | (cd /new && tar xvpf -) (You may have to use --numeric-owner if the user IDs on your liveCD don't match the ones you've used) After copying over the data, change your existing grub/lilo to point to the new disk instead of the old, or (if daring) remove the old drive, put the new one in instead, and boot. I'd keep the old disk -- even if slow, an extra drive is always useful. :-) Regards, -- *Art |
| |||
| Arthur Hagen wrote: > ..... > If you use dd, like Aragorn recommended, you won't be able to increase > more than the last partition of your disk (if the file system supports > growing, ........ > Add the new disk, partition it with the partitions in the same order as > your original disk, boot to a liveCD, and mount both the old and new > partitions. > .............. ................. > new one in instead, and boot. I'd keep the old disk -- even if slow, an > extra drive is always useful. :-) > > Regards, Thanks, I'll have a deeper look on your fulla answer regards, jf |
| |||
| Aragorn wrote: > On Sunday 07 May 2006 01:38, I stood up and spoke the following words to > the masses in /alt.os.linux.gentoo...:/ > >> [...] >> >> After the copy, you remove the old disk and you put the new one on the >> same controller and channel - e.g. secondary master or primary slave - >> where the other one does. [...] > > That should of course read "... on the same controller where the other > one used to be". Sorry for my butterfingering - it's getting late over > here... ;-) > I had made the correction, it's OK will make me keep the same partition size, except the last one. BTW, you're lucky you can avoid using Winndows, I'd like that, but my PC is also used for work, and.... regards, jf |
| |||
| "Arthur Hagen" <art@broomstick.com> writes: >What kind of file system? If ext2/3 or xfs, you can use dump/restore or >xfsdump/xfsrestore to copy the files over and still retain all attributes, >special files, quotas, streams and everything else. But then you have to use the same file system on source and destination, right? I have used GNU tar successfully in the past, it does the right thing for device files (any other special files you had in mind?), I have not used quota, not sure what happened to streams and everything else (ACLs? Other funny attributes?), but that was some time ago. Do modern distributions use the things not supported by tar more than old distributions? - anton -- M. Anton Ertl Some things have to be seen to be believed anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen http://www.complang.tuwien.ac.at/anton/home.html |
| |||
| On Sunday 07 May 2006 16:13, jf stood up and spoke the following words to the masses in /alt.os.linux.gentoo...:/ > Aragorn wrote: > >> On Sunday 07 May 2006 01:38, I stood up and spoke the following words >> to the masses in /alt.os.linux.gentoo...:/ >> >>> [...] >>> >>> After the copy, you remove the old disk and you put the new one on >>> the same controller and channel - e.g. secondary master or primary >>> slave - >>> where the other one does. [...] >> >> That should of course read "... on the same controller where the >> other one used to be". Sorry for my butterfingering - it's getting >> late over here... ;-) >> > > I had made the correction, it's OK > says, will make me keep the same partition size, except the last one. That is also what I said. ;-) Yet, I was assuming that the replacement of the hard disk was a matter of technical reliability, rather than one of running out of diskspace. ;-) Arthur's advice is solid and valid, of course. ;-) > BTW, you're lucky you can avoid using Winndows, I'd like that, but my > PC is also used for work, and.... I've never been stuck to Windows the way most people are. I have only ever used Windows in a limited way - Windows 3.x for six months and Windows NT 4.0 Workstation for about two and a half years - as a kind of phase in search of "the right operating system for me". On my first PC - a Brother slimline desktop with an AMD 80386DX processor - I opted for OS/2 where everyone else at the time was using MS-DOS and Windows 3.x. On my Pentium II, I've used Windows NT - while everyone else used Win95 and Win98 - because I was too unaware of GNU/Linux at the time - it was still in its infancy back then - and I didn't have an Internet connection. Proprietary Unix was very expensive as well. But in the end, that machine served as a GNU/Linux-only box. I've actually only used a dual-boot set-up for about a month. I've never been one to adopt choices made by others as being those that would apply to me - this probably has to do with my Asperger's Syndrome - and so I've never allowed myself to get hooked by a particular operating system I didn't want to use to begin with. ;-) There is nothing whatsoever that would require me to have Windows on my machine. I even pick my hardware solely in function of compatibility with GNU/Linux. People do send me MS-Office documents via e-mail sometimes, but OpenOffice can handle those pretty well, and if need be, then I can save a spreadsheet or a text document in a Microsoft-compatible format with it. And well... if I get some proprietary multimedia format in my e-mail - which typically will be for Windows Media Player - and I can't open it, then too bad for the one who sent it to me. If it really matters to them that I see it, then they should make use of open standards. ;-) You know, it's kind of like smoking... Non-smokers are in the majority and I understand all their arguments. Yet if they want courtesy from smokers, then they should show courtesy _to_ smokers as well. Using GNU/Linux is more or less the same. It's just healthier. ;-) -- With kind regards, *Aragorn* (Registered GNU/Linux user # 223157) |
| |||
| Aragorn wrote: > There is nothing whatsoever that would require me to have Windows on my > machine. I even pick my hardware solely in function of compatibility > with GNU/Linux. > > People do send me MS-Office documents via e-mail sometimes, but > OpenOffice can handle those pretty well, and if need be, then I can > save a spreadsheet or a text document in a Microsoft-compatible format > with it. > > And well... if I get some proprietary multimedia format in my e-mail - > which typically will be for Windows Media Player - and I can't open > it, then too bad for the one who sent it to me. If it really matters > to them that I see it, then they should make use of open standards. ;-) > > You know, it's kind of like smoking... Non-smokers are in the majority > and I understand all their arguments. Yet if they want courtesy from > smokers, then they should show courtesy _to_ smokers as well. > > Using GNU/Linux is more or less the same. It's just healthier. ;-) > About the hd replacement, yes, it is a matter of reliability, but it is always good to get more space About using windows or not, as I said, you're lucky. I need it for my job, and have no choice. But as soon as I use my PC for personal matters, it is Gentoo. But I have to admit that sometimes, things are not as simple that you can think : I'm still unable to get my 5.1 audio system to work with linux, too bad...for me regards, jf |
| ||||
| Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote: > "Arthur Hagen" <art@broomstick.com> writes: >> What kind of file system? If ext2/3 or xfs, you can use >> dump/restore or xfsdump/xfsrestore to copy the files over and still >> retain all attributes, special files, quotas, streams and everything >> else. > > But then you have to use the same file system on source and > destination, right? Same file system family, yes. But you can do ext2 -> ext3 or xfs -> xfs_rt too, and the size of the partition doesn't have to be the same, like with dd. > I have used GNU tar successfully in the past, it does the right thing > for device files (any other special files you had in mind?), I have > not used quota, not sure what happened to streams and everything else > (ACLs? Other funny attributes?), but that was some time ago. Do > modern distributions use the things not supported by tar more than old > distributions? Many security applications use ACLs, if present. Many sysadmins do too -- for as few as four users, it's way easier to assign access rights to to Peter, Paul, Mary and Chong according to need, than having to create eleven(!) different groups with the possible combinations. ACLs are not preserved by tar. Also, if you share out to Windows or MacOS, there's metadata stored with the files, like MacOS' resource fork, or Windows' system/hidden/archive bits or ownership (if Samba is set up correctly). For xfs, there's also attributes like SGI_XFSDUMP_SKIP_FILE which can be (optionally) used to make dumps skip certain files. Regards, -- *Art |