Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
is it possible to abuse protective partition?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
piotr5
Tux's lil' helper
Tux's lil' helper


Joined: 14 Dec 2012
Posts: 101

PostPosted: Thu Sep 04, 2014 3:29 pm    Post subject: is it possible to abuse protective partition? Reply with quote

I'd like to have windows98 and linux on the same 3tb drive. windows sees the 750gb which also old linux versions would see, but the new linux should see the full 3tb. so, my plan is to partition the disk with gpt and then change the protective partition so that it actually is pointing inside of a "protective gpt partition" (to protect it from gpt-aware tools as it's old mbr type of partition). anybody done this yet? is there any alternative to my plan? why has nobody ever created an actual linux-partition-table format? any possibility to use lvm to access parts of the disk which are inaccessible because of mbr partition?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43192
Location: 56N 3W

PostPosted: Thu Sep 04, 2014 7:56 pm    Post subject: Reply with quote

piotr5,

You can mix partition tables if you are very careful but you can no longer boot most versions of windows.

The problem is in the areas af disk layout you cannot fix.
The MSDOS disk label gives you a MBR in sector 0 then at least 63 sectors of empty space. The partition table is at the end of the MBR
The GPT disk label gives you a MBR in sector 0 then starts the partition table in sector 1.
So far it all works. It looks like you arrange empty space to keep the GPT partition table safe.
If you only wanted data on the partitions it can be made to work.

The problem arises when you install a boot loader The MBR is too small, so almost without exception, boot loaders designed to work with MSDOS disk labels use some of the free space before the first partition.
Thus installing a boot loader will destroy the primary copy of your GPT partition table. When you boot a GPT aware OS, it will detect this and fix it by copying the secondary copy of the GPT partition table over your Win98 boot loader.

If you want to try really hard at this, you need to allocate GPT partitions from the top down, put the Windows 98 boot loader in the GPT partition table fix the GPT partition table checksum, then update the secondary copy of the GPT partition table, so everything matches. Its an interesting intellectual exercise but it would be far easier to rum Windows 98 in a Virtual Machine of some sort and just use GPT.

You mentioned LVM. Most Virtual Machines can donate a logical volume to the guest.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
piotr5
Tux's lil' helper
Tux's lil' helper


Joined: 14 Dec 2012
Posts: 101

PostPosted: Thu Sep 04, 2014 11:01 pm    Post subject: Reply with quote

thanks for your insights on this topic. I never thought of using the MBR, rather the per-partition boot-record entry. of course installing win will overwrite mbr, I just need to add gpt after doing that. the point is that my bios isn't aware of gtp, but yet it (supposedly) can still boot from it. I suspect I'll need to mess with grub1 though. can I chain-boot from grub1 into grub2?

as for lvm, this isn't some sort of virtual machine, the linux-command "pvcreate --setphysicalvolumesize" sounds interesting. use it on the last partition and you get access to data beyond the allowed mbr-type partitionsize. you just can't boot from it, but you have absolutely no gpt. I'll try that first...
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43192
Location: 56N 3W

PostPosted: Fri Sep 05, 2014 7:29 pm    Post subject: Reply with quote

piotr5,

The per-partition boot-record entry will not allow you to install a bootable Win 98.
Thu Win 98 boot loader will always overwrite your GPT partition table as it is always installed is the spare space that does not belong to any filesystem.
GPT does not provide this spare space.

pvcreate --setphysicalvolumesize olly allows to set a value smaller than the actual volume size, so if sda1 is your physical volume, you can set a sike smaller that sda1 but you cannot use this cammand to access any space past the end of sda1
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum