Showing posts with label partitions. Show all posts
Showing posts with label partitions. Show all posts

Sunday, September 20, 2009

Customizing Debian

One of Debian's features I really like is that everything isn't installed by default. I can customize my installation without having to remove tons of things I don't want. Since I am still dual booting to Windows and will be sharing space on the hard drive with Microsoft's file system NTFS, I will need a way to access those files. Most distros are assuming that we will be accessing and mounting NTFS drives and the truth is quite a few of us will, so they install the driver. But Debian by default doesn't install the needed driver ntfs-3g. So here are he simple steps to install the driver I found on a Google search of 'mount ntfs drives in debian': (if following the directions in the link you will notice #6 for me is different, I had to modify the mount command for my system)
  1. Open a termnal session as root
  2. apt-get install libfuse2
  3. apt-get install ntfs-3g
  4. Identify the ntfs partition using command: fdisk -l | grep NTFS
  5. mkdir /mnt/windows  (you can call this something different)
  6. mount -t ntfs /dev/hda1 /mnt/windows -o defaults,umask=0
Now you will have access to your Windows NTFS partition. If you have more than one just repeat substituting the appropriate partition references. When you are done be sure to un-mount the drive with the umount command (not a typo).

This can also be set at boot time by editing the fstab file in a text editor. Caution!! Messing up this file will render the system to a non-bootable state. Only change what is needed by adding this line to the file: /dev/hda1  /mnt/windows  ntfs-3g    defaults      0 0
Of course you will want to identity of the partition as found from the command step 4 gives you. This will have to be done as root of course and the file is in /etc. Follow these steps as root:
  1. cp -v /etc/fstab /etc/fstabold  (this copies the original)
  2. gedit /etc/fstab  (or your favorite editor)
  3. Add the line:  /dev/hda1  /mnt/windows  ntfs-3g    defaults      0 0
  4. Close the editor and re-boot. The partition will be ready for access each time you boot now.
For someone like me that dual boots, it is important to be able to access files in all partitions. From Windows I use the driver Ext2 IFS in Windows to access Linux partitions. I plan on writing about this in my Working With Windows blog so watch for it.

Saturday, September 19, 2009

Shrinking Windows Partition


When I started this blog my Windows partition was 100GB's. Now I only give it just a tick over 27GB"s. Why you ask? To install Linux. tonight I finished with my install of Debian Lenny complete with wireless. It did take me the better part of two evenings and a lot o command line work but I did learn some things along the way. I plan on sticking with Debian as my main distro. Debian has a lot to offer and I can grow into it for a long time. And let's face it most of the more popular distros are based on Debian anyway. Ubuntu and all of its derivatives, Mepis, AntiX and a host of others are all derived from Debian. That's all for now I still have my favorite game to install along with a few other things.

Monday, May 25, 2009

Using Gparted part 2

Last Saturday I decided that for this laptop I would be using two main OS's. AntiX as the main boot partition and Puppy Linux. With this in mind I wanted to increase the size of the AntiX partition but Gparted would not allow the deletions of hda5 and hda6 unless logical drives with a higher number were unmounted. Easy enough with hda7 which held AntiX but hda8 was a Linux swap partition and refused to unmount while booted to the hard drive in either OS. The solution was to boot with a Puppy Linux live cd and run Gparted from there. I was then able to unmount the Linux swap and delete the older hda5 and hda6 partitions. Next it was a simple matter to increase the size of hda7 which now became hda6. Since hda7 had previously held the bootable partition, I would still need to edit Grub's menu.lst file to recognize the changes. I should also mention that it is not recommended by Gparted to move partitions forward and it recommends backing up data. But in this case the home directory is safe on it's own partition hda2 and was untouched with this process so I didn't worry about backing up. In menu.lst I had to change two values to reflect the changes made. This is the section with the old values:

title MEPIS at hda7, newest kernel
root (hd0,6)
kernel /boot/vmlinuz root=/dev/hda7 nomce quiet splash vga=791 resume=/dev/hda8
initrd /boot/initrd.img
boot

and these are the new values:

title MEPIS at hda6, newest kernel
root (hd0,5)
kernel /boot/vmlinuz root=/dev/hda6 nomce quiet splash vga=791 resume=/dev/hda5
initrd /boot/initrd.img
boot

It's easy to see the values for the partition is what changed. If you move or change partitions that are holding the boot loader, in this case Grub, you will get an error if not edited. I now have three primary partitions and one extended partition holding two logical drives, Linux swap and hda6. I should also point out that Gparted lists the partitions as sda and Grub shows them as hda but the end results are the same. Here is a new screenshot of my hard drive showing the changes. You can compare changes with the previous post's screenshot.






Thursday, May 21, 2009

Using Gparted

If dual booting is something you plan on doing then Gparted will become a very useful tool. Almost all distros will have this tool installed. If not it is easily aquired via most distros' repositories. Gparted stands for Gnome Partition Editor. The current release is version 0.4.5 and is also available at Sourceforge.net. Gparted can read various file systems including fat16/32, ntfs, ext2/3 and several more. If you need to create partitions, re-size them or simply format a drive, this tool can do the job. Do you need to copy or move an entire drive? Gparted can handle this too. I have only scratched the surface in my experience using Gparted. I have re-sized partitions on a laptop running Windows XP and Ubuntu 8.10 on a 120GB hard drive. I was able to change the size of both partitions without data loss or downtime. Here is a view from a 20GB hard drive I am running right now. I have Puppy Linux on the first partition, Mepis 8 on the hda3 (they are out of order since I had given too much room for Puppy and used Gparted to create hda3), on hda2 is the home partition being shared by all OS's. I created an extended partition and placed logical drives within it. AntiX resides on hda7 and there are two unused spaces left over. Using Gparted to manage this hard drive makes it possible and keeps it very simple. Let's hear what tools you use to manage drives?