LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Installing to a logical partition to boot (https://www.linuxquestions.org/questions/linux-newbie-8/installing-to-a-logical-partition-to-boot-4175429375/)

omegaaf 09-27-2012 09:28 PM

Installing to a logical partition to boot
 
Hello! I have a question that might be not so newbish.

So, windows will only recognize the first physical partition on a flash drive. What I wish to accomplish is to have a bootable distro(live with persistence) not be recognized by windows, and instead have another partition (8192mb) to be recognized by windows and the rest only visible in Linux. How does one go about doing this?

omegaaf 09-27-2012 11:54 PM

(To the mods - Sorry for the double post, I just want to add a little more info if people are unsure of what I said)

I have a 32gb flash drive, partitioned into a 24gb and an 8gb partition respectively. I want to install a Linux OS to the 24gb partition (with unetbootin) and have it be invisible to the average joe on Windows. However, the 8gb partition will still be visible inside Windows. On the 24gb partition, I wish for it to boot as a normal Live OS with persistence.

I have no trouble creating the Live USB, I have troubles making it invisible to Windows and maintaining its booting properties. What do I do in order to make this possible?

Ive googled it and the only info Ive found on it would be to create a logical partition so Windows does not see it. Unfortunately, this method does not seem to work for me, or perhaps I am doing something wrong.

nugat 09-27-2012 11:58 PM

Quote:

Originally Posted by omegaaf (Post 4791190)
So, windows will only recognize the first physical partition on a flash drive.

Are you sure about that? Do you have multiple Windows-formatted partitions on the flash drive?

Quote:

What I wish to accomplish is to have a bootable distro(live with persistence) not be recognized by windows, and instead have another partition (8192mb) to be recognized by windows and the rest only visible in Linux. How does one go about doing this?
That should be relatively easy: partition your flash drive with the first partition (sda1) as Linux (Type 83 in Linux), and install your Linux OS to it. It will use ext3 or whatever and will not be recognizable to Windows as a valid disk partition (w/o special software/drivers). Leave 8GB or however much you want free for Windows. Then create the 2nd partition as Windows (you can use Type "b" in fdisk) and format it w/FAT32.

You can create both of these partitions during the install phase of your Linux installation, just make sure to use any Advanced mode offered by the installer. FWIW, I do this w/Fedora/CentOS/RHEL quite a bit.

You can also try out UNetbootin for installing Linux to a USB disk, although I have no idea how friendly it is to advanced disk partition (i bet it would let you, though, it is very popular).

nugat 09-28-2012 12:00 AM

Quote:

Originally Posted by omegaaf (Post 4791261)
I have no trouble creating the Live USB, I have troubles making it invisible to Windows and maintaining its booting properties. What do I do in order to make this possible?

okay, you must mean something special by invisible to Windows - i thought you just meant that the partition would not be auto-mounted, but do you mean that the Windows Disk Management tool itself would not even "see" the partition?

omegaaf 09-28-2012 12:01 AM

Quote:

Originally Posted by nugat (Post 4791265)
Are you sure about that? Do you have multiple Windows-formatted partitions on the flash drive?

That should be relatively easy: partition your flash drive with the first partition (sda1) as Linux (Type 83 in Linux), and install your Linux OS to it. It will use ext3 or whatever and will not be recognizable to Windows as a valid disk partition (w/o special software/drivers). Leave 8GB or however much you want free for Windows. Then create the 2nd partition as Windows (you can use Type "b" in fdisk) and format it w/FAT32.

You can create both of these partitions during the install phase of your Linux installation, just make sure to use any Advanced mode offered by the installer. FWIW, I do this w/Fedora/CentOS/RHEL quite a bit.

You can also try out UNetbootin for installing Linux to a USB disk, although I have no idea how friendly it is to advanced disk partition (i bet it would let you, though, it is very popular).

Sadly I have tried that, and it doesnt seem to work, Windows says it needs to be formatted.

omegaaf 09-28-2012 12:04 AM

Quote:

Originally Posted by nugat (Post 4791268)
okay, you must mean something special by invisible to Windows - i thought you just meant that the partition would not be auto-mounted, but do you mean that the Windows Disk Management tool itself would not even "see" the partition?

Yes, I want that 24gb partition completely invisible to windows, only recognizing the 8gb on the other partition.

nugat 09-28-2012 12:05 AM

Quote:

Originally Posted by omegaaf (Post 4791269)
Sadly I have tried that, and it doesnt seem to work, Windows says it needs to be formatted.

Not sure why you're having trouble. I have a usb disk that has a 200MB /boot partition (with syslinux), followed by a 2GB FAT32 partition, a 2GB Linux partition, and another 2GB FAT32 partition. I am able to see both FAT partitions in Windows.

omegaaf 09-28-2012 12:09 AM

Quote:

Originally Posted by nugat (Post 4791271)
Not sure why you're having trouble. I have a usb disk that has a 200MB /boot partition (with syslinux), followed by a 2GB FAT32 partition, a 2GB Linux partition, and another 2GB FAT32 partition. I am able to see both FAT partitions in Windows.

Perhaps I am missing a step or something, Ive tried all day reinstalling the OS over and over with different filesystems, different MBRs, everything I could possibly think of. The closest Ive gotten is it saying its not a proper boot device and to insert a floppy disk.

nugat 09-28-2012 12:11 AM

Quote:

Originally Posted by omegaaf (Post 4791270)
Yes, I want that 24gb partition completely invisible to windows, only recognizing the 8gb on the other partition.

try breaking it down to something simpler:

put your flash drive on your Linux box and create two partitions:

sdb1 => 200MB, Type 83
sdb2 => 200MB, Type b

then format them:
Code:

mkfs.ext3 /dev/sdb1
mkfs.vfat /dev/sdb2

fsck.ext3 /dev/sdb1
fsck.vfat /dev/sdb2

then remove the drive and attach it to Windows and see what it thinks.

also, remove the bootable bit if set on either partition.

NOTE: sdb is just an example, of course, be sure to insert the proper partition!

nugat 09-28-2012 12:13 AM

Quote:

Originally Posted by omegaaf (Post 4791273)
Perhaps I am missing a step or something, Ive tried all day reinstalling the OS over and over with different filesystems, different MBRs, everything I could possibly think of. The closest Ive gotten is it saying its not a proper boot device and to insert a floppy disk.

try making the first partition your /boot partition, 200MB should be enough.

then make the 2nd one FAT32 (primary, not logical), and the 3rd one Linux (your root filesystem, etc.).

omegaaf 09-28-2012 01:02 AM

Thank you very much nugat, with your help, it is now working. I owe you one.

nugat 09-28-2012 10:57 PM

np - just curious, what was it exactly that seemed to do the trick?

omegaaf 09-30-2012 05:19 PM

Quote:

Originally Posted by nugat (Post 4792159)
np - just curious, what was it exactly that seemed to do the trick?

The command line apparently, I was trying to use gparted and I guess it wasnt partitioning it properly.

Thank you again Good Sir

nugat 10-01-2012 12:13 AM

Quote:

Originally Posted by omegaaf (Post 4793493)
The command line apparently, I was trying to use gparted and I guess it wasnt partitioning it properly.

ah, okay. that doesn't surprise me. i'm a big fan of fdisk (and sfdisk for scripting) myself.

cheers!


All times are GMT -5. The time now is 02:14 PM.