Unix Technical Forum

SEO

vBulletin Search Engine Optimization


Go Back   Unix Technical Forum > Unix Operating Systems > Linux Operating System

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-19-2008, 06:13 AM
stevewy@hotmail.com
 
Posts: n/a
Default Partitioning problem

I was trying to install Ubuntu as a dual boot on my PC. My main 80Gb
HDD was partitioned already into C: (Windows system NTFS) and D:
(Storage and files NTFS), both 40Gb each. I had cleared D: and told
Ubuntu to install there. However, during installation there was a
problem and I had to abort. Second time round, Ubuntu refused to
install onto the same drive.

In the end, I successfully installed onto my back-up drive, which is
only 10Gb, and I have no problem with this. However, I now want to re-
partition my main 80Gb HDD, as the abortive Ubuntu installation has
substantially reduced the size of the drive available.

I do not have any Windows partitioning tools, but I have tried to use
QTParted for this, which I have on a Knoppix Live DVD. As I am not
sure what I am doing, I am steadily making it worse! I wondered if
anyone on this group could tell me where I am going wrong.

My current setup is:

C: (under Windows) NTFS size 39.57Gb starting at 0.03Mb, ending at
39.57Gb. This contains my Windows system.
D: (under Windows) NTFS size 20.02Gb starting at 39.57Gb ending at
59.60Gb.

Partition 03 HDA-1 (Free) size 16.36Gb starting at 59.60Gb ending at
75.96Gb
Partition 04 HDA4 (Extended) size 745.2Mb starting at 75.96Gb ending
at 76.69Gb
Partition 05 HDA5 (Linux-swap) 745.17Mb starting at 75.96Gb ending at
76.69Gb

What I want on this disk drive is just C: (unchanged) and D: which can
be either NTFS or FAT32 (I'm not bothered!), but to be one partition
of 40Gb, same as C:

I somehow need to remove the unwanted partitions and extend D: to be
40Gb. But I cannot get QTParted to do it, and I am afraid to
experiment too much in case I mess up the C:, which I wanted to keep.

Can anyone help me?

Thanks

Steve Wylie
Kent
U.K.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-19-2008, 06:13 AM
Roby
 
Posts: n/a
Default Re: Partitioning problem

stevewy@hotmail.com wrote:

> I was trying to install Ubuntu as a dual boot on my PC. My main 80Gb
> HDD was partitioned already into C: (Windows system NTFS) and D:
> (Storage and files NTFS), both 40Gb each. I had cleared D: and told
> Ubuntu to install there. However, during installation there was a
> problem and I had to abort. Second time round, Ubuntu refused to
> install onto the same drive.
>
> In the end, I successfully installed onto my back-up drive, which is
> only 10Gb, and I have no problem with this. However, I now want to re-
> partition my main 80Gb HDD, as the abortive Ubuntu installation has
> substantially reduced the size of the drive available.
>
> I do not have any Windows partitioning tools, but I have tried to use
> QTParted for this, which I have on a Knoppix Live DVD. As I am not
> sure what I am doing, I am steadily making it worse! I wondered if
> anyone on this group could tell me where I am going wrong.
>
> My current setup is:
>
> C: (under Windows) NTFS size 39.57Gb starting at 0.03Mb, ending at
> 39.57Gb. This contains my Windows system.
> D: (under Windows) NTFS size 20.02Gb starting at 39.57Gb ending at
> 59.60Gb.
>
> Partition 03 HDA-1 (Free) size 16.36Gb starting at 59.60Gb ending at
> 75.96Gb
> Partition 04 HDA4 (Extended) size 745.2Mb starting at 75.96Gb ending
> at 76.69Gb
> Partition 05 HDA5 (Linux-swap) 745.17Mb starting at 75.96Gb ending at
> 76.69Gb
>
> What I want on this disk drive is just C: (unchanged) and D: which can
> be either NTFS or FAT32 (I'm not bothered!), but to be one partition
> of 40Gb, same as C:
>
> I somehow need to remove the unwanted partitions and extend D: to be
> 40Gb. But I cannot get QTParted to do it, and I am afraid to
> experiment too much in case I mess up the C:, which I wanted to keep.
>
> Can anyone help me?
>
> Thanks
>
> Steve Wylie
> Kent
> U.K.

Hi Steve!

As I understand it, your drive setup is now like this:

hda1 39.57gB ntfs windows o/s
hda2 20.02gB ntfs windows data (empty)
hda3 16.36gB unused formerly Ubuntu
hda4 (extended)
hda5 745.17mB swap

Look in your (new) Ubuntu install. Does /etc/fstab
show that /dev/hda5 as the swap partition? If so, you
must decide whether to leave it that way or make a new
swap partition on your 10gB drive so that hda5 can be
recycled to its formaer (windows) role. I will assume
hda5 is NOT needed by Ubuntu. Adjust as appropriate.

Ubuntu has the tools you need to revise the partitioning
on your 80gB drive - or the packages can be easily installed.

My choice would be to use cfdisk to first delete hda2 and
above, then create a new hda2 using all of the available
space. Then boot windows and use it to format D:.

gparted is a very slick gui that will also do what you need.
I had a lot of trouble with qtparted too, but gparted works
very well. It will allow you to perform the same operations
I listed for cfdisk, or you may be brave and delete just hda3/4/5
and then grow hda2 into the new free space.

Make a backup of windows before fiddling with the partition
table (and don't save it to your 80g drive!). Bad things
sometimes happen... especially when there's no backup.

Roby
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 01-19-2008, 06:13 AM
stevewy@hotmail.com
 
Posts: n/a
Default Re: Partitioning problem

>>My choice would be to use cfdisk to first delete hda2 and
above, then create a new hda2 using all of the available
space.

I have looked at /etc/fstab as you suggested, and my current working
Ubuntu does not need any of the hda partitions, as it is installed
entirely on hdb. For the avoidance of doubt here, can you give me the
command line I will need for cfdisk (I am assuming here that this is a
shell command) to erase the unwanted partitions on hda, leaving me
with my existing 39Gb Windows partition and one 39Gb FAT32 partition I
can use for my Ubuntu programs? I have looked at the man page for
cfdisk and it is a bit puzzling...

Steve

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 01-19-2008, 06:13 AM
Roby
 
Posts: n/a
Default Re: Partitioning problem

stevewy@hotmail.com wrote:

>My choice would be to use cfdisk to first delete hda2 and
> above, then create a new hda2 using all of the available
> space.
>
> I have looked at /etc/fstab as you suggested, and my current working
> Ubuntu does not need any of the hda partitions, as it is installed
> entirely on hdb. For the avoidance of doubt here, can you give me the
> command line I will need for cfdisk (I am assuming here that this is a
> shell command) to erase the unwanted partitions on hda, leaving me
> with my existing 39Gb Windows partition and one 39Gb FAT32 partition I
> can use for my Ubuntu programs? I have looked at the man page for
> cfdisk and it is a bit puzzling...
>
> Steve


cfdisk is curses-based ... a poor-man's gui. Run it as root and
point it at your main drive (be sure none of hda is mounted):

$ sudo cfdisk /dev/hda

(It will look sorta like this

cfdisk 2.12r

Disk Drive: /dev/hda
Size: 80060424192 bytes, 80.0 GB
Heads: 255 Sectors per Track: 63 Cylinders: 9733

Name Flags Part Type FS Type [Label] Size (MB)
--------------------------------------------------------------
hda1 Boot Primary NTFS 35370
hda2 Primary NTFS 20020
hda3 Primary ext3 16360
hda5 Logical Linux swap / Solaris 745.17

[Bootable] [ Delete ] [ Help ] [Maximize] [ Print ] [ Quit ]
[ Type ] [ Units ] [ Write ]

Toggle bootable flag of the current partition

Navigation: up/down arrows move partition selection, left/right
arrows move operation selection.

Highlight hda5, select Delete. Repeat for hda3, then hda2.
Now select the free space and create a new primary partition
starting at the beginning of the free space and occupying all
of the space. Menus will guide you. Then set the type to
83 for linux. Finally (and most important), look at the new
arrangement...last chance!! Now select Write and cfdisk will
revise the partition table to your specifications. Then choose
Quit. You do have that backup, yes?

cfdisk has changed the partition table (only). You must format
the newly assigned space. First reboot. It's not really needed
in this particular case, but good practice after any partition
table change.

Format the fs of your choice; e.g., sudo mkfs -t ext3 /dev/hda2
Revise /etc/fstab to tell Ubuntu what you did.

Roby
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 01-19-2008, 06:13 AM
Roby
 
Posts: n/a
Default Re: Partitioning problem

Roby wrote:

> stevewy@hotmail.com wrote:
>
>>My choice would be to use cfdisk to first delete hda2 and
>> above, then create a new hda2 using all of the available
>> space.
>>
>> I have looked at /etc/fstab as you suggested, and my current working
>> Ubuntu does not need any of the hda partitions, as it is installed
>> entirely on hdb. For the avoidance of doubt here, can you give me the
>> command line I will need for cfdisk (I am assuming here that this is a
>> shell command) to erase the unwanted partitions on hda, leaving me
>> with my existing 39Gb Windows partition and one 39Gb FAT32 partition I
>> can use for my Ubuntu programs? I have looked at the man page for
>> cfdisk and it is a bit puzzling...
>>
>> Steve

>
> cfdisk is curses-based ... a poor-man's gui. Run it as root and
> point it at your main drive (be sure none of hda is mounted):
>
> $ sudo cfdisk /dev/hda
>
> (It will look sorta like this
>
> cfdisk 2.12r
>
> Disk Drive: /dev/hda
> Size: 80060424192 bytes, 80.0 GB
> Heads: 255 Sectors per Track: 63 Cylinders: 9733
>
> Name Flags Part Type FS Type [Label] Size (MB)
> --------------------------------------------------------------
> hda1 Boot Primary NTFS 35370
> hda2 Primary NTFS 20020
> hda3 Primary ext3 16360
> hda5 Logical Linux swap / Solaris 745.17
>
> [Bootable] [ Delete ] [ Help ] [Maximize] [ Print ] [ Quit ]
> [ Type ] [ Units ] [ Write ]
>
> Toggle bootable flag of the current partition
>
> Navigation: up/down arrows move partition selection, left/right
> arrows move operation selection.
>
> Highlight hda5, select Delete. Repeat for hda3, then hda2.
> Now select the free space and create a new primary partition
> starting at the beginning of the free space and occupying all
> of the space. Menus will guide you. Then set the type to
> 83 for linux. Finally (and most important), look at the new
> arrangement...last chance!! Now select Write and cfdisk will
> revise the partition table to your specifications. Then choose
> Quit. You do have that backup, yes?
>
> cfdisk has changed the partition table (only). You must format
> the newly assigned space. First reboot. It's not really needed
> in this particular case, but good practice after any partition
> table change.
>
> Format the fs of your choice; e.g., sudo mkfs -t ext3 /dev/hda2
> Revise /etc/fstab to tell Ubuntu what you did.
>
> Roby


Small correction: I misunderstood the final format of the new hda2.
Choose the type number for fat32, and mkfs -t vfat /dev/hda2.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-19-2008, 06:13 AM
zeno
 
Posts: n/a
Default Re: Partitioning problem

On Jul 2, 9:16 am, Roby <r...@no-address.net> wrote:
> Roby wrote:
> > stev...@hotmail.com wrote:

>
> >>My choice would be to use cfdisk to first delete hda2 and
> >> above, then create a new hda2 using all of the available
> >> space.

>
> >> I have looked at /etc/fstab as you suggested, and my current working
> >> Ubuntu does not need any of the hda partitions, as it is installed
> >> entirely on hdb. For the avoidance of doubt here, can you give me the
> >> command line I will need for cfdisk (I am assuming here that this is a
> >> shell command) to erase the unwanted partitions on hda, leaving me
> >> with my existing 39Gb Windows partition and one 39Gb FAT32 partition I
> >> can use for my Ubuntu programs? I have looked at the man page for
> >> cfdisk and it is a bit puzzling...

>
> >> Steve

>
> > cfdisk is curses-based ... a poor-man's gui. Run it as root and
> > point it at your main drive (be sure none of hda is mounted):

>
> > $ sudo cfdisk /dev/hda

>
> > (It will look sorta like this

>
> > cfdisk 2.12r

>
> > Disk Drive: /dev/hda
> > Size: 80060424192 bytes, 80.0 GB
> > Heads: 255 Sectors per Track: 63 Cylinders: 9733

>
> > Name Flags Part Type FS Type [Label] Size (MB)
> > --------------------------------------------------------------
> > hda1 Boot Primary NTFS 35370
> > hda2 Primary NTFS 20020
> > hda3 Primary ext3 16360
> > hda5 Logical Linux swap / Solaris 745.17

>
> > [Bootable] [ Delete ] [ Help ] [Maximize] [ Print ] [ Quit ]
> > [ Type ] [ Units ] [ Write ]

>
> > Toggle bootable flag of the current partition

>
> > Navigation: up/down arrows move partition selection, left/right
> > arrows move operation selection.

>
> > Highlight hda5, select Delete. Repeat for hda3, then hda2.
> > Now select the free space and create a new primary partition
> > starting at the beginning of the free space and occupying all
> > of the space. Menus will guide you. Then set the type to
> > 83 for linux. Finally (and most important), look at the new
> > arrangement...last chance!! Now select Write and cfdisk will
> > revise the partition table to your specifications. Then choose
> > Quit. You do have that backup, yes?

>
> > cfdisk has changed the partition table (only). You must format
> > the newly assigned space. First reboot. It's not really needed
> > in this particular case, but good practice after any partition
> > table change.

>
> > Format the fs of your choice; e.g., sudo mkfs -t ext3 /dev/hda2
> > Revise /etc/fstab to tell Ubuntu what you did.

>
> > Roby

>
> Small correction: I misunderstood the final format of the new hda2.
> Choose the type number for fat32, and mkfs -t vfat /dev/hda2.


Following the above discussion, I didnt see where the Windows OS is
on NTFS
or on VFAT. Big distinction. If you have the OS disk, you could
reformat the partition as VFAT which will allow you to use, write,
edit, files across OSs.
Otherwise you can Samba. If this is not a problem, well have a nice
day.

Zeno


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-19-2008, 06:13 AM
stevewy@hotmail.com
 
Posts: n/a
Default Re: Partitioning problem

Bit too late for that now, as I read your original message and did
what you said on 1 July. I've only just got back to this newsgroup
and read your correction. However, it is not essential it is FAT32 -
I just want something that Linux will read from and write to. I have
my original C: partition of 40Gb for all my Windows stuff, so the
other 40Gb for Linux-only stuff is only right and proper!

However, one tiny problem - how do I edit FSTAB to put my new
partition details in? I have located the file, but when I double-
click on it, it comes up as Read Only.

Now I have re-booted, I find I still only have 1.2Gb available,
instead of 39.4Gb which it should be. I presume this is because my
Ubuntu is reading the partition details from FSTAB, and they are wrong
because I haven't corrected them yet; and that my disk is still
partitioned with my hda2 as 39.4Gb.

Please advise.

Steve

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 01-19-2008, 06:13 AM
Roby
 
Posts: n/a
Default Re: Partitioning problem

stevewy@hotmail.com wrote:

> Bit too late for that now, as I read your original message and did
> what you said on 1 July. I've only just got back to this newsgroup
> and read your correction. However, it is not essential it is FAT32 -
> I just want something that Linux will read from and write to. I have
> my original C: partition of 40Gb for all my Windows stuff, so the
> other 40Gb for Linux-only stuff is only right and proper!
>
> However, one tiny problem - how do I edit FSTAB to put my new
> partition details in? I have located the file, but when I double-
> click on it, it comes up as Read Only.
>
> Now I have re-booted, I find I still only have 1.2Gb available,
> instead of 39.4Gb which it should be. I presume this is because my
> Ubuntu is reading the partition details from FSTAB, and they are wrong
> because I haven't corrected them yet; and that my disk is still
> partitioned with my hda2 as 39.4Gb.
>
> Please advise.
>
> Steve


You'll need root privilege to change /etc/fstab; e.g.,
$ sudo nano /etc/fstab
or
$ sudo mc /etc
or whatever it takes to get your favorite gui editor to run as root.

The easiest entry would be something like:
/dev/hda2 /mnt/hda2 ext3 defaults 0 2
(If this is the last line of the file, be sure it ends with a carriage
return.)

.... and you may need to create the mount point with:
$ sudo mkdir /mnt/hda2

It is stylish to use one of those remarkable UUID's to name the device.
You'll probably find the rest of your fstab written this way. You can
look up the UUID for the new partition like this:
$ sudo /lib/udev/vol_id /dev/hda2

Sooooo much to learn, so little time. Be brave. It is worth it!

Roby
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 01-19-2008, 06:13 AM
stevewy@hotmail.com
 
Posts: n/a
Default Re: Partitioning problem

I'll give it a go tonight when I get home. Thanks for all your
assistance.

I'm using an older version of Ubuntu at the moment, because I bought a
book on Learning Ubuntu Linux and it had a CD at the back of the book
to use. It is an old version but I figured since the book directly
refers to its features during its explanations, I'd better stick with
it while I'm still learning. Once I've got to grips with the basics,
I can seek out and install the latest version, probably "Feisty Fawn",
which I understand can read and write to NTFS partitions anyway. I
imagine before long all the major distros will go over to NTFS, so as
to be compatible with the inevitable Windows partitions and data
that's already on most people's PCs when they install Linux.

Steve

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:22 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
UnixAdminTalk.com

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 60