Author Topic: <SOLVED>Help me reshuffle my main drive (Old Polack you busy?)  (Read 852 times)

Offline barryc

  • Sr. Member
  • ****
  • Posts: 321
Here are some printouts of what I've got:

[barry@BigBee ~]$ sup
<=== SYSTEM ===>
  Distro info:  Kernel 2.6.38.8-pclos3.pae.bfs on a 4-processor i686 / \l  PCLinuxOS release 2012 (PCLinuxOS) for i586
  Kernel:       Linux BigBee 2.6.38.8-pclos3.pae.bfs #1 SMP PREEMPT Fri Jul 8 18:23:21 CDT 2011 i686 i686 i386 GNU/Linux
  Uptime:       17:12:18 up  3:44,  3 users,  load average: 0.50, 0.44, 0.30
  Memory:       Total: 4006Mb   Used: 1440Mb    Free: 2566Mb
  Swap:         Total: 4196Mb   Used: 0Mb       Free: 4196Mb
  Architecture:
  Processor:    0 : AMD Phenom(tm) II X4 965 Processor
  Processor:    1 : AMD Phenom(tm) II X4 965 Processor
  Processor:    2 : AMD Phenom(tm) II X4 965 Processor
  Processor:    3 : AMD Phenom(tm) II X4 965 Processor
  Date:         Fri Jun  1 17:12:18 EDT 2012

<=== USER ===>
  User:         barry (uid:500)
  Groups:       barry lp floppy cdrom usb cdwriter audio video dialout users lpadmin polkituser fuse
  Working dir:  /home/barry
  Home dir:     /home/barry

<=== NETWORK ===>
  Hostname:     BigBee
  IP (lo):      127.0.0.1/8
  IP (eth0):    192.168.1.4/24
  Gateway:      192.168.1.1
  Name Server:  192.168.1.1


[barry@BigBee ~]$ su
Password:
[root@BigBee barry]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              30G  6.2G   22G  22% /
/dev/sdb1             459G   16G  420G   4% /archives
/dev/sda6             386G  2.2G  364G   1% /data
/dev/sdc1             276G   26G  236G  10% /datavault
/dev/sda5              40G  3.8G   36G  10% /home

[root@BigBee barry]# blkid
/dev/sda1: LABEL="pclinuxos" UUID="9774f124-f32c-41d9-bd6d-5637fe0acdbf" TYPE="ext4"
/dev/sda6: LABEL="data" UUID="7be15a78-765b-4080-af47-ed6da7702b67" TYPE="ext4"
/dev/sdb1: LABEL="archives" UUID="700fcbbf-afe9-4448-a864-1f8c43365b97" TYPE="ext4"
/dev/sdc1: LABEL="datavault" UUID="0734cdfc-8303-4d8b-8c96-7b8c0fad7c16" TYPE="ext4"
/dev/sda5: LABEL="home" UUID="b027507f-1d3c-4b70-b358-b3c04fc7deef" TYPE="ext4"
/dev/sda3: UUID="a4ab2bdb-6838-46aa-8b3b-b92304dafd87" TYPE="swap" LABEL="swap"

[root@BigBee barry]# fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0001c2c4

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63    62974799    31487368+  83  Linux
/dev/sda2        71569575   976773119   452601772+   5  Extended
/dev/sda3        62974800    71569574     4297387+  82  Linux swap / Solaris
/dev/sda5        71569638   155509199    41969781   83  Linux
/dev/sda6       155509263   976773119   410631928+  83  Linux

Partition table entries are not in disk order

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63   976773167   488386552+  83  Linux
/dev/sdb2   *           0           0           0    0  Empty
/dev/sdb3   *           0           0           0    0  Empty
/dev/sdb4   *           0           0           0    0  Empty

Disk /dev/sdc: 300.1 GB, 300090728448 bytes
16 heads, 63 sectors/track, 581463 cylinders, total 586114704 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *          63   586114703   293057320+  83  Linux

As you can see, /dev/sda partitions are out of order.  Why?, you may ask.  Because when I tried to label
it, I messed up.  Deleted it and created a new one which resulted in the mess.

I have already backed up my root partition (sda1) and my home (sda5) with clonezilla.

Is there some way of rearranging the positions in the correct order.  For some reason it seems like
the OS is doing a lot of searching at bootup.  Takes about 2 minutes to boot now vs. around 20 seconds
previously.

Here's my fstab...

# Entry for /dev/sda1 :
LABEL=pclinuxos / ext4 defaults 1 1
# Entry for /dev/sdb1 :
LABEL=archives /archives ext4 defaults 1 2
# Entry for /dev/sda6 :
LABEL=data /data ext4 defaults 1 2
# Entry for /dev/sdc1 :
LABEL=datavault /datavault ext4 defaults 1 2
none /dev/pts devpts defaults 0 0
#Entry for /dev/sda3 :
#UUID=32979c3b-c1ec-434e-97d9-6561ac2144fb swap swap defaults 0 0
LABEL=swap swap swap defaults 0 0
# Entry for /dev/sda5 :
LABEL=home /home ext4 defaults 1 2
//BigBee/barry-share /mnt/barry-share cifs username=% 0 0
//Lappy2/joan-share /mnt/joan-share cifs username=% 0 0
none /proc proc defaults 0 0

...and my Grub menu.lst

timeout 5
color black/cyan yellow/cyan
gfxmenu (hd0,0)/boot/gfxmenu
default 0

title linux
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=linux root=LABEL=pclinuxos resume=LABEL=swap quiet nokmsboot splash=silent vmalloc=256M vga=788
initrd (hd0,0)/boot/initrd.img

title linux-nonfb
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=linux-nonfb root=LABEL=pclinuxos resume=LABEL=swap vmalloc=256M
initrd (hd0,0)/boot/initrd.img

title failsafe
kernel (hd0,0)/boot/vmlinuz BOOT_IMAGE=failsafe root=LABEL=pclinuxos vmalloc=256M failsafe
initrd (hd0,0)/boot/initrd.img

title memtest-4.20
kernel (hd0,0)/boot/memtest-4.20 BOOT_IMAGE=memtest-4.20

title 2.6.38.8-pclos3.pae.bfs
kernel (hd0,0)/boot/vmlinuz-2.6.38.8-pclos3.pae.bfs BOOT_IMAGE=2.6.38.8-pclos3.pae.bfs root=UUID=9774f124-f32c-41d9-bd6d-5637fe0acdbf resume=UUID=a4ab2bdb-6838-46aa-8b3b-b92304dafd87 nokmsboot quiet splash=silent vmalloc=256M vga=788
initrd (hd0,0)/boot/initrd-2.6.38.8-pclos3.pae.bfs.img






« Last Edit: June 02, 2012, 10:09:58 AM by barryc »
You gotta have balls to play golf.

Online Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11688
  • ----IOFLU----
Re: Help me reshuffle my main drive (Old Polack you busy?)
« Reply #1 on: June 01, 2012, 05:56:30 PM »

[root@BigBee barry]# fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0001c2c4

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63    62974799    31487368+  83  Linux
/dev/sda2        71569575   976773119   452601772+   5  Extended
/dev/sda3        62974800    71569574     4297387+  82  Linux swap / Solaris
/dev/sda5        71569638   155509199    41969781   83  Linux
/dev/sda6       155509263   976773119   410631928+  83  Linux

Partition table entries are not in disk order


This is easy; /dev/sda2 and /dev/sda3 are simply transposed, and both are primary partitions, so follow along in a terminal, logged in as root.

[root@fatman ~]# fdisk /dev/sda

Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)                          <-- Choose this item

Command (m for help): x

Expert command (m for help): m
Command action
   b   move beginning of data in a partition
   c   change number of cylinders
   d   print the raw data in the partition table
   e   list extended partitions
   f  fix partition order                                                 <-- Choose this item first
   g   create an IRIX (SGI) partition table
   h   change number of heads
   i   change the disk identifier
   m   print this menu
   p   print the partition table
   q   quit without saving changes
   r   return to main menu                                            <-- Follow with this
   s   change number of sectors/track
   v   verify the partition table
   w   write table to disk and exit

Expert command (m for help): f
Nothing to do. Ordering is correct already.                  <-- You won't see this message


Expert command (m for help): r

Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table                                           <-- Use to check the fix is correct
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit                                      <-- If so, use this last
   x   extra functionality (experts only)

Command (m for help): p

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0001c2c4

   Device Boot          Start              End             Blocks        Id  System
/dev/sda1   *               63      62974799      31487368+      83  Linux
/dev/sda2        62974800      71569574        4297387+      82  Linux swap / Solaris
/dev/sda3        71569575    976773119    452601772+        5  Extended
/dev/sda5        71569638    155509199       41969781       83  Linux
/dev/sda6       155509263   976773119     410631928+     83  Linux


Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8 ) or kpartx(8 )
Syncing disks.
[root@fatman ~]#

If you have parted installed, you can run the command     partprobe /dev/sda          <Enter>      to have the kernel read the new partition table when followed by the  fdisk -l command. The table shown should be as shown above, from within fdisk.
« Last Edit: June 01, 2012, 06:01:32 PM by Old-Polack »
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline barryc

  • Sr. Member
  • ****
  • Posts: 321
Re: Help me reshuffle my main drive (Old Polack you busy?)
« Reply #2 on: June 01, 2012, 07:10:07 PM »
Worked like a charm!!  ;D ;D
Many thanks.  I was almost on the verge of wiping the disk and restoring root and home parts.
Figured you might have the perfect answer (as usual).
You should put out a book with all your posts cataloged by troubleshooting topics.  Maybe
even a special issue of pclos magazine.  Could be very useful to new users of pclos and save
you from a lot of repetitive answers.

Thanks again.
 
You gotta have balls to play golf.

Online Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11688
  • ----IOFLU----
Re: Help me reshuffle my main drive (Old Polack you busy?)
« Reply #3 on: June 01, 2012, 07:41:06 PM »
barryc:

You are most certainly welcome.

I have a lot of these fixes bookmarked, to make it easy to post a link to whichever previous thread reply is most appropriate, but sometimes the fix is so quick I can run through it on my own computer, copy/paste the results directly, then add a bit of color, and a few notes to personalize a fix, quicker than I can look up the older posts. I'll add the above to the bookmarks, just because it's complete within a single post. The next person with a similar problem will get a link to here. ;)
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...

Offline barryc

  • Sr. Member
  • ****
  • Posts: 321
Re: <SOLVED>Help me reshuffle my main drive (Old Polack you busy?)
« Reply #4 on: June 02, 2012, 10:42:17 AM »
Whoops, I forgot the slow boot speed.  Figured the uuid on the initrd was probably the old uuid.
Found the answer on how to update it to the new updated uuid in this post:
http://www.pclinuxos.com/forum/index.php/topic,104190.0.html Reply #13.

I made a new initrd file based on this post, rebooted and voila -- 20 second boot instead of 1 1/2 minutes.
Evidently grub was searching for the swap file and couldn't connect with the old uuid printed on the disk.
« Last Edit: June 02, 2012, 10:44:15 AM by barryc »
You gotta have balls to play golf.

Online Old-Polack

  • Administrator
  • Super Villain
  • *****
  • Posts: 11688
  • ----IOFLU----
Re: <SOLVED>Help me reshuffle my main drive (Old Polack you busy?)
« Reply #5 on: June 02, 2012, 12:56:57 PM »
barryc:

Very good!  ;D
Old-Polack

Of what use be there for joy, if not for the sharing thereof?



Lest we forget...