OT or not, heres my solution :) On Fri, 2002-11-01 at 12:26, Dan Clowater wrote: > OK - stupid question... I put in my new HD - the bios sees it but I > can't seem to see it in Linux. It was a Mac formatted drive and I have > no idea how to find/format it in Linux... more help please! :) WARNING!! READ THIS THOROUGHLY before doing any of these steps, make sure you back up your existing partitions that you want to move/resize. Most of these steps need you to be root (or rather, as a user, type 'sudo' before everything) which means if you stuff it up, theres no turning back! If you mount a partition as /home, and you already have a /home under / then you won't see your old home! Also, labelling multiple partitions the same will confuse fstab, if you're using labels. I would appreciate some feedback if this is flawed in any areas. It has worked for me so far though! 1) find out what device it is: primary master: /dev/hda " slave: /dev/hdb secondary master: /dev/hdc " slave: /dev/hdd and then type 'fdisk /dev/hdx' (where x is the above letter). From there you can partition it the way you want (type m for help, n for new, p for print, w for write-exit, etc). The default type is 83 (Linux) so you shouldn't need to change this. You will be left with some partitions (at least one), each one numbered (y). Remember the numbers from fdisk. You _may_ need to reboot at this point but I doubt you will since your drive isn't currently used. 2) type 'mkfs.ext3 /dev/hdxy' for each partition you've created on the disk that you want formatted as ext3 (where x is drive letter and y is partition number). 3) type 'e2label /dev/hdxy <label>' for each partition where label is something like '/home' or '/tmp' etc (your mount point, leave out the ''). You can skip this step. 4) If you're making a new /home because you've run out of space on / then DON'T do the next two steps until you've done this one: mount the drive temporarily mkdir /mnt/foo mount /dev/hdxy /mnt/foo cp -R /home /mnt/foo umount /dev/hdxy now all your home data will be in two places. The original (/home) and the new partition (/dev/hdxy). When you've mounted your new home successfully, you can delete the old copy. 5) edit /etc/fstab and enter, say, LABEL=/home /home ext3 defaults 0 2 or /dev/hdb1 /home ext3 defaults 0 2 if you skipped the e2label step. 0 is used by 'dump' and 2 is "to determine the order in which filesystem checks are done at reboot time." (man 5 fstab). Basically /root should be 1 and others 2. 6) you can now call 'mount -a' to mount all filesystems in fstab. You should now be able to cd to the particular mount point. *** WARNING *** DON'T DELETE /home at this stage or you'll be deleting your new home, not your old one! This information comes from my own experience. To read similar info, go to www.tldp.org, or search on google. -- Iain Buchanan <iain@nospam.pcorp.com.au> 1.79 x 10^12 furlongs per fortnight -- it's not just a good idea, it's the law!
Attachment:
signature.asc
Description: This is a digitally signed message part