Page 1 of 1

Running Linux on a Partitionless disk

Posted: Mon Dec 28, 2015 9:05 am
by Quaker763
Hey guys,

So I just installed arch linux the other day, but when installing it completely slipped my mind to use /dev/sda1 instead of /dev/sda when using mkfs, mounting etc. Doh! :cry:

I now have NO partition table, but the whole disk is formatted to ext4 with GRUB2 and runs perfectly.

I guess the question is (for anyone experienced with ext4/linux partituoning) will I suffer any data corruption/degredation from having no partition table or possibly erode the drive more (it's a 250gb SSD)?

Re: Running Linux on a Partitionless disk

Posted: Mon Dec 28, 2015 9:21 am
by MasterLee
On all hard disk where i only have one Partition i get rid of partition table and never lost any data on those disks in the last five years. Well i never lost data under Linux only on Windows.

Re: Running Linux on a Partitionless disk

Posted: Mon Dec 28, 2015 9:27 am
by Quaker763
So one huge volume should be fine partitionless? I'm actually surprised it booted considering I have no MBR. Maybe thats why GRUB was angry when I tried to install it haha.

Re: Running Linux on a Partitionless disk

Posted: Mon Dec 28, 2015 10:21 am
by onlyonemac
Perhaps GRUB made a fuss during installation, but if it's installed now then there's no reason why it won't work. Your BIOS doesn't know the difference between an MBR and a VBR, so it loads the VBR as if it was an MBR and assumes that it will do its thing. Meanwhile, the GRUB VBR doesn't care that it was loaded directly by the BIOS because GRUB is designed to work as a VBR anyway and there's no way for GRUB to know if it was loaded by the BIOS or by an MBR (which is why you can install GRUB to either the MBR or a VBR on a normally-partitioned hard drive).

The only problems that I can imagine is if you ever want to partition the hard drive, or if you're following online tutorials and they're referring to separate partitions. I imagine that some software might get confused if there are no /dev/sda1, /dev/sda2, etc. devices, or it might assume that /dev/sda has a partition table at the beginning (e.g. gparted).

In short, it's an interesting exercise but I strongly suggest that, since this is a fresh install that you messed up, you re-install it correctly before you start using it routinely.

Re: Running Linux on a Partitionless disk

Posted: Mon Dec 28, 2015 11:15 am
by Brendan
HI,

In addition to what other people have already said...

I'd recommend having a minimum of 2 partitions for any OS - one for the easily replaced/reinstalled stuff (the OS, applications, etc), and a separate partition for user data. This makes it easy to only backup user data, and makes it easy to wipe the OS without losing user data. It also gives you some simple disk quotas (e.g. accidentally filling up the user data partition doesn't cause applications to fail due to "not enough space for temp. files", etc).

For OS developers; I'd also consider having a small (500 MiB?) "unused" partition, just in case you feel like installing your own OS one day.


Cheers,

Brendan

Re: Running Linux on a Partitionless disk

Posted: Mon Dec 28, 2015 11:59 am
by onlyonemac
Brendan wrote:For OS developers; I'd also consider having a small (500 MiB?) "unused" partition, just in case you feel like installing your own OS one day.
That probably isn't necessary. Re-partitioning isn't really a big deal.

Re: Running Linux on a Partitionless disk

Posted: Mon Dec 28, 2015 4:36 pm
by iansjack
Quaker763 wrote:So one huge volume should be fine partitionless? I'm actually surprised it booted considering I have no MBR. Maybe thats why GRUB was angry when I tried to install it haha.
Why wouldn't it boot? It's got a boot sector and an MBR is just a specialized boot sector. I can think of no reason why this setup, unusual though it is, should cause any problems. But it does mean that if you wish to partition the disk at a later stae it will be a destructive process.

Re: Running Linux on a Partitionless disk

Posted: Tue Dec 29, 2015 12:29 am
by Antti
iansjack wrote:Why wouldn't it boot? It's got a boot sector and an MBR is just a specialized boot sector.
It is likely that it boots. However, it may not boot because some BIOS implementations are not just checking the boot signature. They may parse the partition table and calculate proper "sectors per track" and "heads" values from it so that legacy master boot records work. If we had an invalid partition table, this all could jump into an "untested" error handler. I recommend being defensive and avoid unusual master boot record layouts.

Re: Running Linux on a Partitionless disk

Posted: Tue Dec 29, 2015 1:56 am
by Quaker763
iansjack wrote:Why wouldn't it boot? .
I read somewhere that some BIOS'es will refuse to boot an operating system with no partition info. My friend installed arch with no partition as well, and he was unable to boot, though HDT detected GRUB2.

Thanks for the help and advice guys, I just did a reinstall on /dev/sda1, so I have one large primary partition formatted to ext4, and GRUB installation made 0 fuss this time. Thank god I only had to copy my home folder haha.

I suppose all this will come in handy when I finally get around to writing disk drivers for my OS. :)

Re: Running Linux on a Partitionless disk

Posted: Mon Jan 04, 2016 6:10 am
by Combuster
Quaker763 wrote:
iansjack wrote:Why wouldn't it boot? .
I read somewhere that some BIOS'es will refuse to boot an operating system with no partition info.
UEFI requires a FAT partition and a GUID partition table because it boots on filename basis rather than sector basis. Legacy disabled is also the default BIOS setting for quite a few if not most new computers.