LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-23-2007, 02:59 PM   #1
uncle-c
Member
 
Registered: Oct 2006
Location: The Ether
Distribution: Ubuntu 16.04.7 LTS, Kali, MX Linux with i3WM
Posts: 299

Rep: Reputation: 30
Renaming disk partitions - possible ?


Hi,
I run the "fdisk -l" command as root on my Ubuntu 7.04 server box the results I get make interesting reading.
There is no /dev/hda1 and Ubuntu is installed on /dev/hda2. There is also an extended partition ( with a logical partition contained within that). When I do a "find" at the grub prompt I get a message that grub is found in (hd0,1). What would be the best way of renaming /dev/hda2 to /dev/hda1. Would the renaming effect my extended / logical partition ?

Thanks
Uncle.
 
Old 10-23-2007, 03:04 PM   #2
The_JinJ
Member
 
Registered: Apr 2004
Location: Scotland
Distribution: Suse, OpenWRT
Posts: 299

Rep: Reputation: 30
Can you paste fdisk -l results here?
 
Old 10-23-2007, 03:20 PM   #3
uncle-c
Member
 
Registered: Oct 2006
Location: The Ether
Distribution: Ubuntu 16.04.7 LTS, Kali, MX Linux with i3WM
Posts: 299

Original Poster
Rep: Reputation: 30
Code:
Disk /dev/hda: 20.8 GB, 20847697920 bytes
255 heads, 63 sectors/track, 2534 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda2               1        2488    19984828+  83  Linux
/dev/hda3            2489        2534      369495    5  Extended
/dev/hda5            2489        2534      369463+  82  Linux swap / Solaris
Obviously I want /dev/hda2 --> /dev/hda1 , hda3 renamed hda2, and hda5 renamed as hda4 !

Last edited by uncle-c; 10-23-2007 at 03:22 PM.
 
Old 10-23-2007, 03:54 PM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
I'm wondering how you got in this situation---the disk is fully partitioned. But, no matter...

First, it is not really necessary to change this--you can simply change the grub config file to point where you want.

If I am not mistaken, the label is tied only to which entry in the partition table is used. 1-4 are used for primary or extended, and the first logical is always 5. This means that #1 is empty. The only way I know to correct this would be to use dd to move the data. I've never done this, so I can't promise it would work.

Note that your swap space is a bit small--People say things like 2X RAM size, but I always just use 1GB. For this reason alone, I would simply re-partition the drive. you could also re-size #2 and then make a new #1.

If you want to confirm the partition table directly, do this:

dd if=/dev/hda skip=446 bs=1 count=64|hexdump -C
The first and fourth rows should be all zeros, 2 and 3 will have similar entries.

My "booting" link below has more info, including links to the structure of a partition table
 
Old 10-24-2007, 03:46 AM   #5
uncle-c
Member
 
Registered: Oct 2006
Location: The Ether
Distribution: Ubuntu 16.04.7 LTS, Kali, MX Linux with i3WM
Posts: 299

Original Poster
Rep: Reputation: 30
Thanks Pixellany.
The Ubuntu box seems to be working fine, so I may go with the philosophy that "if it ain't broke don't fix it." It was just that having /dev/hda2 and no /dev/hda1 does not look aesthetically correct.

Regards,
Uncle

Last edited by uncle-c; 10-24-2007 at 05:19 AM.
 
Old 10-24-2007, 07:42 AM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by uncle-c View Post
Thanks Pixellany.
The Ubuntu box seems to be working fine, so I may go with the philosophy that "if it ain't broke don't fix it." It was just that having /dev/hda2 and no /dev/hda1 does not look aesthetically correct.

Regards,
Uncle
That's a good philosophy--I wish I were smart enough to practice it...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Stupid disk renaming mmiikkee12 Linux - Hardware 3 07-21-2007 10:07 PM
Using disk partitions ecuas Linux - Newbie 3 01-24-2007 07:54 AM
removed disk partitions - disk is now too small jordanthompson Linux - Software 18 12-09-2004 03:07 PM
How many partitions on one disk? alanbarnard Linux - Newbie 3 12-04-2004 09:04 AM
Help with disk partitions gagda1 Linux - Newbie 3 10-14-2004 08:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration