Author Topic: How to change the size of partitions? (resolved)  (Read 3461 times)

0 Members and 1 Guest are viewing this topic.

Offline Tramlink

  • Hero Member
  • *****
  • Posts: 681
  • Karma: 12
  • Gender: Male
  • Is the mist clearing
    • View Profile
    • Awards
Re: How to change the size of partitions?
« Reply #15 on: January 16, 2013, 03:44:19 pm »
All the most important documents are held in dropbox and the system is backed up to a Drive on the LAN.

What I have noticed is that I could not reduce the size of "resize the extended partition to be just big enough to contain sdb5 (swap)"  I had to extend the extended partition to fill the drive and then........ resize sdb7 to fill the rest of the drive (the extended partition).

At present this will take another hour and 5 mins.

Online Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13468
  • Karma: 332
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: How to change the size of partitions?
« Reply #16 on: January 16, 2013, 03:55:34 pm »
Sorry .. I thought sda7 was outside the extended partition .. that should be fine.
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline Tramlink

  • Hero Member
  • *****
  • Posts: 681
  • Karma: 12
  • Gender: Male
  • Is the mist clearing
    • View Profile
    • Awards
Re: How to change the size of partitions?
« Reply #17 on: January 16, 2013, 05:06:41 pm »
Requested Info:

Quote
mint@mint ~ $ sudo fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 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: 0xa970a970

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63   312576704   156288321    b  W95 FAT32

Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 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: 0x00031f7b

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb2            2048   312580095   156289024    5  Extended
/dev/sdb5       299810816   312580095     6384640   82  Linux swap / Solaris
/dev/sdb6           10240   299808767   149899264   83  Linux

Partition table entries are not in disk order
mint@mint ~ $

Quote
mint@mint ~ $ sudo blkid
/dev/loop0: TYPE="squashfs"
/dev/sda1: LABEL="CLIVE1" UUID="3B0D-1C00" TYPE="vfat"
/dev/sr0: LABEL="Linux Mint 13 MATE 64-bit" TYPE="iso9660"
/dev/sdb5: UUID="b9b68dc9-f641-402a-9162-a302820398db" TYPE="swap"
/dev/sdb6: UUID="4d9cd1eb-9ff2-4fc3-878e-21bc3134853b" TYPE="ext4"
mint@mint ~ $

Online Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13468
  • Karma: 332
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: How to change the size of partitions?
« Reply #18 on: January 16, 2013, 05:29:17 pm »
OK, whilst still booted to the LivecD .. open a terminal  and run:
sudo mount /dev/sdb6 /mnt
then
sudo grub-install --boot-directory=/mnt/boot /dev/sda
now REBOOT to the hard drive (ie. without the LiveCD)

It should boot into Mint 13 .. then in Mint 13, open a terminal and run:
Code: [Select]
sudo update-grub

When that's done .. reboot to see that you're offered both Windows and Mint.
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline Tramlink

  • Hero Member
  • *****
  • Posts: 681
  • Karma: 12
  • Gender: Male
  • Is the mist clearing
    • View Profile
    • Awards
Re: How to change the size of partitions?
« Reply #19 on: January 16, 2013, 05:55:40 pm »
Mint and windows working just fine.

By-the-way 
Quote
sudo update-grub
dose not exist on my system.

But this did not cause any problems.

Thanks for the assistance.

Online Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13468
  • Karma: 332
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: How to change the size of partitions? (resolved)
« Reply #20 on: January 16, 2013, 06:01:06 pm »
Are you sure .. it should ???

So what's the output from:
Code: [Select]
sudo update-grub
?
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline Tramlink

  • Hero Member
  • *****
  • Posts: 681
  • Karma: 12
  • Gender: Male
  • Is the mist clearing
    • View Profile
    • Awards
Re: How to change the size of partitions? (resolved)
« Reply #21 on: January 16, 2013, 07:00:03 pm »
userone@office2 ~ $ sudo update-grub
[sudo] password for userone:
sudo: update-grub: command not found
userone@office2 ~ $

Online Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13468
  • Karma: 332
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: How to change the size of partitions? (resolved)
« Reply #22 on: January 16, 2013, 07:20:22 pm »
Can you post the output from:
Code: [Select]
dpkg -l | grep grub
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline Tramlink

  • Hero Member
  • *****
  • Posts: 681
  • Karma: 12
  • Gender: Male
  • Is the mist clearing
    • View Profile
    • Awards
Re: How to change the size of partitions? (resolved)
« Reply #23 on: January 16, 2013, 07:54:46 pm »
Quote
userone@office2 ~ $ dpkg -l | grep grub
rc  grub-common                                                 1.99-21ubuntu3.1                        GRand Unified Bootloader (common files)
rc  grub-pc                                                     1.99-21ubuntu3.1                        GRand Unified Bootloader, version 2 (PC/BIOS version)
ii  grub2-theme-mint                                            1.0.9                                   Grub2 theme for Linux Mint
userone@office2 ~ $

Offline SeZo

  • Hero Member
  • *****
  • Posts: 1461
  • Karma: 119
  • Gender: Male
    • View Profile
    • Awards
Re: How to change the size of partitions? (resolved)
« Reply #24 on: January 16, 2013, 07:57:12 pm »
Quote
sudo: update-grub: command not found

The command for "update-grub" (as used by Ubuntu) is just an alias.
The real grub2 command would be
Code: [Select]
sudo grub-mkconfig -o /boot/grub/grub.cfg
If you'd like functionality like that, just add this to your ~/.bashrc file:

Code: [Select]
alias update-grub='grub-mkconfig -o /boot/grub/grub.cfg'

Log out and back in and run as normal:
Code: [Select]
sudo update-grub


Online Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13468
  • Karma: 332
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: How to change the size of partitions? (resolved)
« Reply #25 on: January 16, 2013, 09:10:05 pm »
Is it just me ?

These seem to be missing
grub2-common
and
grub-pc-bin

and possibly:-
grub-gfxpayload-lists

And as far as I'm aware, there's no alias in *my* ~/.bashcr ???
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline SeZo

  • Hero Member
  • *****
  • Posts: 1461
  • Karma: 119
  • Gender: Male
    • View Profile
    • Awards
Re: How to change the size of partitions? (resolved)
« Reply #26 on: January 16, 2013, 09:24:32 pm »
Quote
And as far as I'm aware, there's no alias in *my* ~/.bashcr ???

That would be OK on Ubuntu (and derivatives) as it is a built in command.
However on other distros you get grub 'neat' but you could make that command available as an alias ;)

Quote
These seem to be missing
grub2-common
and
grub-pc-bin

You are right:
Quote
rc  grub-common                                                 1.99-21ubuntu3.1                        GRand Unified Bootloader (common files)
rc  grub-pc                                                     1.99-21ubuntu3.1                        GRand Unified Bootloader, version 2 (PC/BIOS version)

That 'rc' would indicate that the package was removed, but that the configuration files are still there.


Online Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13468
  • Karma: 332
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: How to change the size of partitions? (resolved)
« Reply #27 on: January 16, 2013, 09:41:49 pm »
Yeh, I missed those rc(s) .. so there are at least 4 missing packages.

Here's mine (Peppermint 3 - Ubuntu 12.04)

Quote
mark@AA1-Blue ~ $ dpkg -l | grep grub
ii  grub-common                               1.99-21ubuntu3.7                                  GRand Unified Bootloader (common files)
ii  grub-gfxpayload-lists                     0.6                                               GRUB gfxpayload blacklist
ii  grub-pc                                   1.99-21ubuntu3.7                                  GRand Unified Bootloader, version 2 (PC/BIOS version)
ii  grub-pc-bin                               1.99-21ubuntu3.7                                  GRand Unified Bootloader, version 2 (PC/BIOS binaries)
ii  grub2-common                              1.99-21ubuntu3.7                                  GRand Unified Bootloader (common files for version 2)

So I'm thinking:
Code: [Select]
sudo apt-get install --reinstall grub-common grub-pc grub-pc-bin grub2-common
and possibly
Code: [Select]
sudo apt-get install grub-gfxpayload-list
then trying:
Code: [Select]
sudo update-grub

What do you reckon ?

.



Actually the DEBAIN control file for grub-pc states

Quote
Depends: debconf (>= 0.5) | debconf-2.0, grub-common, grub2-common (= 1.99-21ubuntu3.7), grub-pc-bin (= 1.99-21ubuntu3.7), ucf, grub-gfxpayload-lists

But the control for grub-common "suggests" os-prober too (which IS a default package

So this will probably do the trick
Code: [Select]
sudo apt-get install --reinstall grub-pc os-prober
the rest should be pulled in automagcally.
« Last Edit: January 16, 2013, 09:56:13 pm by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline Tramlink

  • Hero Member
  • *****
  • Posts: 681
  • Karma: 12
  • Gender: Male
  • Is the mist clearing
    • View Profile
    • Awards
Re: How to change the size of partitions? (resolved)
« Reply #28 on: January 16, 2013, 09:49:10 pm »
I am not having any problems I am offered mint and XP in the Grub list and they both boot normally.  I could always use Grub recovery disk if required.

Online Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13468
  • Karma: 332
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: How to change the size of partitions? (resolved)
« Reply #29 on: January 16, 2013, 09:57:07 pm »
You WILL have problems if you ever get a kernel or grub update .. or ANYTHING else that needs to modify the boot configuration.

Point is .. do you want to fix it now, or then when we may not be about ? ;)

.
« Last Edit: January 16, 2013, 09:59:48 pm by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal