PDA

View Full Version : Moving to linux



z99
26th March 2010, 12:28 AM
hi,
i completely want to move to linux [fedora core],
i have 160 gb hdd,wanna divide it into 2 parts:
28 gb for linux,
132 gb for music and etc,
what should i do if i want to access to that drive even after doing a fresh installation?
i mean how can i create that partition to be separate from linux but accessible!
well let's say,each time i do a fresh installation the files in that drive must not be erased because of doing a fresh installation,
is this what i should do during the installation process? [for fedora core 12]
create:
/root 19 GB Partition ext4 /dev/sda1
/home 5 GB Partition ext4 /dev/sda2
/swap 4 GB Partition swap /dev/sda3 [ram=2gb]
then create that 132 gb partition! if yes what format it should be?
is there another way? i mean create 132 gb from fdisk and leave the rest for free space and for installation let linux to use free space to install itself,if so what format should this [132 bg] be?
the last thing is:
if this is what it should be,how to mount that drive in order to access that?
thanks in advance

steelaworkn
26th March 2010, 12:57 AM
I have a lot of space for my /home partition. This is where I put all my documents, music, pictures, downloads, and the like. There's also hidden files in that partition. Anyway, for the /home partition I have 200 gigs for that. /root is about 20 gigs and /swap is about 16 gigs (totally over kill). Your /boot partition should be at leas 300 megs. Mine is 500 megs.

Your /home partition can be pretty huge if you want.

z99
26th March 2010, 01:08 AM
so if you erase your Linux you will loose all your data?
what i am going do is to have partition that remains stable after each installation,

BrianMicek
26th March 2010, 01:34 AM
Hi,
I think Steelaworkn is implying that you will be more insulated for each OS install if your home stuff is in its own partition. You'll have all your stuff from /home after a fresh install assuming you don't format it by accident.

z99
26th March 2010, 01:43 AM
thanks,


You'll have all your stuff from /home after a fresh install assuming you don't format it by accident.

so what if it is formatted!

forkbomb
26th March 2010, 01:49 AM
Formatting results in data loss of all the data on the partition and file system.

Aren't you already backing up to another storage device like an external hard drive?

Also 19GB for /root is a total waste. I'm guessing what you meant was 19GB for /. /root is the home directory for the root user and, since it's ill-advised to log in routinely as the root user, you'll probably end up with very little data under /root. Even 10GB for / would probably be enough.

There's a difference between / (usually called "the root directory") and /root (usually called the "slash root" directory).

http://linux.die.net/man/7/hier

z99
26th March 2010, 02:04 AM
yeah you are right,19 gb for /


Aren't you already backing up to another storage device like an external hard drive?

i don't have an external hard drive,
right now i use xp,fedora core 11,and can access to my xp partitions from linux,but i want to remove xp and i don't know what to do to have the same situation but [without xp]?

forkbomb
26th March 2010, 02:14 AM
OK.

I don't mean to get preachy or pedantic, but you should be backing up to external media anyway.

The fact that you're talking about repartitioning your hard drive and changing the operating system, but don't have a backup to external media, is just asking for trouble (http://en.wikipedia.org/wiki/Murphy%27s_law).

Messing around with your partitioning scheme is extra reason to have a backup. Even though theoretically you could come up with a way to keep your data without losing it or copying it to another device, it'd be time consuming and there are many places where things can go wrong even if you do everything right. Partition tables can get corrupted, or something else random could happen that leads to data corruption.

I never bother repartioning a device or changing any of the file systems unless I have a full backup of any data that's on the disk.

schotty
26th March 2010, 07:36 AM
OK.

I don't mean to get preachy or pedantic, but you should be backing up to external media anyway.

The fact that you're talking about repartitioning your hard drive and changing the operating system, but don't have a backup to external media, is just asking for trouble (http://en.wikipedia.org/wiki/Murphy%27s_law).



Word.

I actually use three usb tanks. Two that are right next to my desk, and a third that gets rotated out to my work locker -- just in case. I rotate it out weekly or so (well, more like when I remember to do it). Online storage just isnt cheap enough to backup 300GB of music and another 500G of misc data. Its just simpler to have a few 1TB tanks to take care of it.

That said, you could just save stuff on a thumbdrive that you want to keep, that way there is no chance of vaping the parition out. Plus there are some caveats to sharing a home dir that aside from migrating its tough to get around.

Namely all the config directories in your home dir (.wine, .gimp, etc) are the biggies I can think of. Slight changes from revisions to the layout between distros can cause woes. Or from actual software versions between various revisions of a single distro too.

My personal recomendation is to use a single partition for each distro and a shared drive or partition for your common data. Learn from our f*ckups :D

PabloTwo
26th March 2010, 04:34 PM
right now i use xp,fedora core 11,and can access to my xp partitions from linux,but i want to remove xp and i don't know what to do to have the same situation but [without xp]?
I see one fairly simple solution here. I don't know how much of your 160GB hdd is allocated to your windows XP partition and how much is allocated to F11, but I'm willing to bet Windows XP has the lions share.

You could simply reformat the XP partition as ntfs, wiping out XP, then use that partition for data storage, such as your music collection, etc. Then, when you installed the next version of Fedora to replace the current F11, just select "Use existing Linux partitions" from the installer menu. That will leave your ntfs "data" partition alone and reuse your current Fedora partitions.

This has the added advantage that before you wipe your F11 partitions with a new Fedora install, you can use the ntfs data partition to store any data you want to save/backup from your F11 install. Backing up to USB thumbdrive, external drive or burn to CD/DVD is still the "safest" option though, in case something goes "wrong" and destroys the ntfs partition.

So, unless you're really unhappy with the current partition size configuration between XP and Fedora and want to change that, this would be an easy option to use. I dual boot W2K and F12. I originally had my 160GB hdd divided up into two ntfs partitions, 127GB for W2K and the rest just a data partition. I shrunk the ntfs data partition to make "unallocated space" to install Fedora (F5 at the time), giving Fedora only about 10GB to play with, which was enough, but not enough for amassing GB's of files.

That's where my ntfs data partition steps in, to fill the "ain't enough storage room" problem. Works great for me. I've gone through three reinstalls of Fedora since the first, and my ntfs data partition has remained fully intact in the process.

z99
26th March 2010, 04:48 PM
thank you PabloTwo ,


You could simply reformat the XP partition as ntfs, wiping out XP, then use that partition for data storage, such as your music collection, etc. Then, when you installed the next version of Fedora to replace the current F11, just select "Use existing Linux partitions" from the installer menu. That will leave your ntfs "data" partition alone and reuse your current Fedora partitions.

i think this is a good and easy way,and can i access them via linux with no problem?
but for the second way,would you please describe it more i mean a small tutorial!
thanks again

PabloTwo
26th March 2010, 05:00 PM
Yes, you can easily access the ntfs partition with no problem. I add a line in /etc/fstab to auto mount my ntfs data partition, and have another line in /etc/fstab that prevents my Windows 2000 partition from auto mounting. I don't use Gnome, but I think in the current Gnome environment, ntfs partitions are automatically mounted at boot-up, as I see a lot of posts about "how do I turn that off?".

I'm not sure just what you mean by "the second way". Are you referring to one of the suggestions in one of the earlier posts in this thread? If so, which one?

z99
26th March 2010, 05:17 PM
sorry but if i wipe out my xp and use [Use existing Linux partitions] will it add the space from erasing xp to linux?
well consider this way i just remove xp drive,also remove linux,then use free all my space for installing linux ,and also keep my 2 drives [132 gb],then install linux [let linux use free space for installation],so can i still access that 2 drives?
for the second way i mean:


So, unless you're really unhappy with the current partition size configuration between XP and Fedora and want to change that, this would be an easy option to use. I dual boot W2K and F12. I originally had my 160GB hdd divided up into two ntfs partitions, 127GB for W2K and the rest just a data partition. I shrunk the ntfs data partition to make "unallocated space" to install Fedora (F5 at the time), giving Fedora only about 10GB to play with, which was enough, but not enough for amassing GB's of files.

PabloTwo
26th March 2010, 06:12 PM
hi,
i completely want to move to linux [fedora core],
i have 160 gb hdd,wanna divide it into 2 parts:
28 gb for linux,
132 gb for music and etc,
what should i do if i want to access to that drive even after doing a fresh installation?
i mean how can i create that partition to be separate from linux but accessible!
First off, please don't confuse the terms "drive" and "partition". You now make it sound like you have more than one hard disk drive. From your original, and subsequent posts, I presumed you have a single (one) hdd (hard disk drive), divided up with one partition for the XP installation and the rest allocated to the various Fedora partitions. I suppose it would be possible, but it would be an extremely rare situation for Fedora to be installed into a "single" partition.

To make my suggestion clearer, I hope:

* Reformat the Windows XP partition in ntfs format. This does not "remove the XP drive", it merely removes the XP Operating System from the existing ntfs partition.

* There are a few ways to go about installing a new version of Fedora in the space on the hdd that F11 uses now.

1) Don't do anything with your current F11 install partitions. Assuming there is no "free unallocated space" on the hdd that you would like to include into a new Fedora install, select "use existing Linux partitions" and the default layout, which will use all of the existing LINUX type partitions, either as is, or rearrange them into one /boot ext4 partition and the rest as an LVM group which will contain one swap partition and one / (root) ext4 partition, probably all inside an Win95 LBA extended partition. The reason I suggested reformatting XP with ntfs is that ntfs is not a Linux partition type, so it would not be included when selecting "Use existing Linux Partitions".

2) Select "Custom Layout" (or something like that) from the Fedora installer and manually setup the Fedora partitions you'd like (by removing exiting Fedora partitions and creating new ones and/or resizing exiting partitions. F11 uses ext3, F12 uses ext4 but can use ext3 just fine.

3) If you want a custom Fedora partition layout, boot a gparted Live CD (http://gparted.sourceforge.net/download.php) and pre-configure your Fedora partitions from there, then boot the Fedora install DVD and select "Custom Layout" and choose the partitions you created with gparted.

Now, you haven't said if your current F11 install used the "default" Fedora /boot and LVM setup or if you're using custom /swap and ext3 partitions. If you're using the "default" with LVM, the # 1) choice described above would be the logical and easy choice.

To help make things clearer as to what you have now, you might want to post the output of:

su
fsdisk -l
df -hT
As for doing custom partitioning, I'd leave that for someone else more experienced to advise you as how best to proceed. I tend to be content with using the default LVM setup.

One thing I should make clear now, if you reformat the XP partition, I'm not exactly sure what, if anything, that will do to the MBR (Master Boot Record). If that's affected in the process, the grub boot loader would be "broken" and you'd have to reinstall grub. There's plenty of advice on how to do that on other threads. But, on the other hand, if your upgrading to a newer Fedora in the process, it really wouldn't matter anyway as the new install of Fedora will install grub.

Gaurav Prabhu
26th March 2010, 06:13 PM
I have a lot of space for my /home partition. This is where I put all my documents, music, pictures, downloads, and the like. There's also hidden files in that partition. Anyway, for the /home partition I have 200 gigs for that. /root is about 20 gigs and /swap is about 16 gigs (totally over kill). Your /boot partition should be at leas 300 megs. Mine is 500 megs.

Your /home partition can be pretty huge if you want.

Will you explain the need of so much space for /Boot?
I have read from a good source that /Boot should be 100MB but anything more than that is waste.

PabloTwo
26th March 2010, 06:23 PM
@Gaurav Prabhu-

Using the "pre-upgrade" option to upgrade from one release to the next, Fedora uses the /boot partition to store files, which can amount to well over 100MB, plus all the stuff that lives there normally. True, if you never use "preupgrade", then 100MB for /boot would suffice. There are several posts on this forum about folks preupgrade attempts failing due to running out of room on /boot.

z99
26th March 2010, 06:34 PM
[root@localhost ~]# df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
ext4 12G 4.4G 6.7G 40% /
/dev/sda7 ext3 194M 14M 171M 8% /boot
tmpfs tmpfs 1007M 116K 1007M 1% /dev/shm
/dev/sda1 fuseblk 9.8G 5.1G 4.8G 52% /mnt/AlcatrazC
/dev/sda5 fuseblk 7.9G 6.7G 1.2G 85% /mnt/AlcatrazD
/dev/sda6 fuseblk 114G 104G 11G 91% /mnt/AlcatrazE

[root@localhost ~]# fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xa10aa10a

Device Boot Start End Blocks Id System
/dev/sda1 1 1275 10241406 7 HPFS/NTFS
/dev/sda2 1276 19456 146038882+ f W95 Ext'd (LBA)
/dev/sda5 1276 2295 8193118+ 7 HPFS/NTFS
/dev/sda6 2296 17083 118784578+ 7 HPFS/NTFS
/dev/sda7 * 17084 17109 204799+ 83 Linux
/dev/sda8 17109 19163 16499711+ 8e Linux LVM

Disk /dev/dm-0: 12.6 GB, 12683575296 bytes
255 heads, 63 sectors/track, 1542 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 4211 MB, 4211081216 bytes
255 heads, 63 sectors/track, 511 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000

Disk /dev/dm-1 doesn't contain a valid partition table

PabloTwo
26th March 2010, 07:18 PM
Yeah, that makes the picture much clearer. You have 3 ntfs partitions. I was assuming one. I know, I shouldn't go assuming things. Looks like you're already using F12, as witnessed by the ext4 partition. I'm not sure why I thought you were using F11(?)

The 3 ntfs partitions combined appear to be using about 131GB, about what you wanted, 132GB for music and etc., but your stated goal was to have that in one partition. I personally don't see an "easy" way to combine those 3 ntfs partitions, especially since two are inside the LBA extended partition and one is not, into a single ntfs partition without a major upset of the apple cart.

I see the "easy way out" as to just re-format /dev/sda1 (your XP OS partition) to ntfs as suggested before and then live with 3 separate ntfs partitions to act as your "data storage" partitions outside of the Fedora install. That would only work if, say, the 114GB /dev/sda6 partition was of adequate size to hold your current and anticipated future size music library. That keeps your current F12 install and allows for easy updates to the next release as described previously without disturbing your "3" data storage partitions.

Otherwise, I see a complete re-partitioning of the hdd from scratch if you want to have that single 132BG data storage partition. Were it me doing that, I think my strategy would be to backup all my data, use gparted to remove all partitions on the drive, create a 132GB partition (ntfs) at the end of the drive, boot the Fedora install DVD and do a default install (LVM) to "unallocated free space", which would be at the front of the drive, then restore my data.

There should be plenty of other suggestions from others on this.

z99
26th March 2010, 07:35 PM
Otherwise, I see a complete re-partitioning of the hdd from scratch if you want to have that single 132BG data storage partition. Were it me doing that, I think my strategy would be to backup all my data, use gparted to remove all partitions on the drive, create a 132GB partition (ntfs) at the end of the drive, boot the Fedora install DVD and do a default install (LVM) to "unallocated free space", which would be at the front of the drive, then restore my data.

as i want the first partition's space [xp] to be added to linux,and also want to have that 132 gb in one partition i think the is the best way,
thank you so much pablo,
is gparted like fdisk,can i use fdisk instead of gparted?

PabloTwo
26th March 2010, 08:04 PM
as i want the first partition's space [xp] to be added to linux,and also want to have that 132 gb in one partition i think the is the best way,
I think you're confused, and your statement only makes me confused. You can't have it "both ways".

The first partition (XP) is only 9.8GB in size. Maybe you're thinking of the 3 ntfs partitions combined as being the "XP partition"? By "added to linux", do you mean a partition that can be "mounted" and used by Linux, or a partition that is absorbed into Linux, as in adding that space into the existing LVM? Adding hdd's and/or partitions into a logical volume can be done, but it's complicated and certainly not anything I'd recommend you attempt at your present skill level, or mine either for that matter. If you simply want to "use" that space in Linux, you can do by just mounting that partition as you do now, whether it's ntfs, ext3 or ext4.

Fact is, as I see it, to create that 132GB partition is going to require a total re-partitioning scheme, regardless of whether you choose to continue using default LVM or go with a custom partition lay out..

With a custom partition layout not using LVM, you can create your 132GB partition, even formatted ext4, and not loose any data on it when you upgrade to the next release, just as you can with /home as pointed out in an earlier post on this thread if you create that as it's own separate partition, you just have to know what you're doing in Anaconda when you upgrade.

fdisk can do much of the same things that gparted does, but I don't think the Linux fdisk can format to ntfs. Not real sure on that one actually. gparted has a more intuitive interface, making it easier to see and understand what it is your doing. With fdisk, it's command line interactive so you had better know exactly what you're doing ahead of time before you begin using it.

z99
27th March 2010, 03:38 AM
sorry dude,
i just want to spread the space i've used for linux,
by removing xp,the 9.8GB which i've been used for xp will be released,
so i can have approximately 28gb for linux,
and the rest to create a 132GB partition (ntfs) to be data storage partition as you said,

ziko
27th March 2010, 04:34 AM
I got what z99 wants to do. Combining both /dev/sda1 with /dev/mapper/VolGroup-lv_root.
I don't really know if it can be done or not but you may not benefit from it if you could. Cause is your ext4 partition is already 12gb i.e. enough for desktop use with some programming IDEs as well. you may delete your /dev/sda1 or format it as ext4 and use it as your home directory for now. But Consider formatting your whole disk drive in the future as the partition layout is not so clear.

You can use PartedMagic (http://partedmagic.com/download.html). It is bootable cd and contains easy to use gui for formatting.

then you can modify /etc/fstab to mount your new partition as your /home

Gaurav Prabhu
27th March 2010, 06:12 PM
@Gaurav Prabhu-

Using the "pre-upgrade" option to upgrade from one release to the next, Fedora uses the /boot partition to store files, which can amount to well over 100MB, plus all the stuff that lives there normally. True, if you never use "preupgrade", then 100MB for /boot would suffice. There are several posts on this forum about folks preupgrade attempts failing due to running out of room on /boot.

Thanks for the info. I didn't knew about that as I don't update via the "pre-upgrade".