Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            1985    23975935    11986975+   f  W95 Ext'd (LBA)
/dev/sdb2   *    23975936    24180734      102399+   7  HPFS/NTFS/exFAT
/dev/sdb3        24180736   233895934   104857599+   7  HPFS/NTFS/exFAT
/dev/sdb4       233895936  1250263039   508183552    7  HPFS/NTFS/exFAT
/dev/sdb5            2048    23975935    11986944    1  FAT12

The extended partition contains some recovery tools. Partition sdb3 has Windows 8 installed on it. Partition sdb4 has some random data (Videos, Music etc).

Is it possible to install Ubuntu on sdb4 such that the data on it can be accessed on both Windows as well as Linux ? Or any other way without deleting the recovery partition ?

Thanks!

share|improve this question
    
Similar to askubuntu.com/questions/149821/… –  RPi Awesomeness Sep 3 '13 at 13:59
    
I did refer to this question before posting my own. As I specified earlier, I do not wish to delete the recovery partition (as suggested in the marked answer). So my question is not really similar to that one. The second answer there suggests formatting the other partition to ext4. This is why I asked another question because I'm not sure whether I will be able to access the data on both Windows and Ubuntu then. –  Shubham Aggarwal Sep 3 '13 at 14:10
    
True, my bad. I was just posting it as it was similar. –  RPi Awesomeness Sep 3 '13 at 14:27
add comment

2 Answers 2

up vote 1 down vote accepted

What you've got is this:

extended partition holding one logical partition
primary partition
primary partition
primary partition where you want to install Linux

This is a rather awkward configuration. The problem is that you've maxed out your primary partition table, so you can't create another primary (or extended) partition; and to create additional logical partitions, you'd need to move and/or resize all three of your primary partitions.

This can be worked around in various ways. Here's what I recommend:

  1. Back up all your important data. (You should have such a backup already.)
  2. Using a Windows partitioning tool, Shrink /dev/sdb4 so that there's free space at the end of the partition sufficient to install Linux.
  3. Download my FixParts program. You can use the Windows version or use a Linux emergency disc that contains it. IIRC, Parted Magic comes with FixParts.
  4. Using FixParts, use the r option to convert /dev/sdb5 into a primary partition.
  5. Use the l option to convert /dev/sdb4 into a logical partition.
  6. Type s to sort the partitions. This will ensure that they're in on-disk order, which will be less confusing than if they're not.
  7. Type p to view the partition table and verify that they're all present. (Note that FixParts doesn't display extended partitions, though, so don't be concerned when you don't see one.)
  8. If all is well, type w to save your changes.
  9. If necessary, reboot into Linux.
  10. Launch GParted and use it to expand the extended partition, which should now be at the end of the disk, covering what was originally /dev/sdb4 (and will now be /dev/sdb5), to cover the free space at the end of the disk.
  11. Install Ubuntu. It should create new logical partition(s) at the end of the disk.
share|improve this answer
    
Interesting this FixPars. Also, you may want to make bold to backup the data ;) –  Braiam Sep 3 '13 at 16:26
    
I'll try your solution. Have all the data backed up. –  Shubham Aggarwal Sep 3 '13 at 16:30
add comment

You can't just install on a partition that has data on it ... what I would be inclined to do is use a windows resizing tool for the partition (such as Paragon HDD Manager), which can resize that partition so that it has just enough space for what is on it that you want to save, and then convert the rest into free space ... and then you could attempt a Linux install into that free space (using the partition tools on the install disk - manually partition it).

... so short answer is No ... not without preliminary work to resize that partition & create a new space for Linux to go ... hopefully you will have no problems turning that space into a 4th primary or 2nd extended partition

If there is nothing particularly important on the following FAT32 partition ... perhaps delete it also, and turn all the free space after resizing the preceding drive into a Volume Group, and then you can create multiple logical volumes inside that ... using them for the Linux install, and as share partitions

  • could you clarify which is the recovery partition?
share|improve this answer
    
sdb1 is the extended partition, in which sdb5 is the recovery partition. –  Shubham Aggarwal Sep 3 '13 at 14:15
    
Is it possible to have a second extended partition ? –  Shubham Aggarwal Sep 3 '13 at 14:17
    
you can have 4 primaries on the one drive, your question title says you have 3 ... do you in fact have 4 already? –  Mr.President Sep 3 '13 at 14:18
    
Either way ... you can't do it without resizing what is there to free up some space in which to make a new partition ... and as far as I know yes you can make another extended –  Mr.President Sep 3 '13 at 14:20
    
If I format the sdb4 partition to ext4 and install Ubuntu on this partition, will I be able to access its data in Windows ? –  Shubham Aggarwal Sep 3 '13 at 14:23
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.