Linux Lite Forums

Software - Support => Installing Linux Lite => Topic started by: whateverthing on June 07, 2018, 01:05:09 AM

Title: Error when booting: Diskfilter writes not supported
Post by: whateverthing on June 07, 2018, 01:05:09 AM
Hi -- I installed LL4.0 a few days ago, onto the same old laptop I was using with LL3.8 before. Now when I boot, I see an error screen that says:
"Error: diskfilter writes are not supported.
 Press any key to continue..."

I've done some Googling, and it apparently comes from GRUB. It seems to have something to do with drive partitions? I definitely don't understand the problem or the answer.
https://askubuntu.com/questions/468466/diskfilter-writes-are-not-supported-what-triggers-this-error/498281#498281 (https://askubuntu.com/questions/468466/diskfilter-writes-are-not-supported-what-triggers-this-error/498281#498281)

It would be nice to get rid of the error. Any help would be appreciated! Should the installation process have made different partitioning choices?
Title: Re: Error when booting: Diskfilter writes not supported
Post by: kpanic on June 11, 2018, 02:52:20 PM
Hi,

Since you installed 4.0 just a few days ago, you probably don't have much important data in there yet?
If you have, can you store it temporarely to a USB stick for example?
This is because I suggest that you make a fresh new installation of LL 4.0.

When you begin the new installation, don't start the actual installation yet, just let the live OS be in the RAM
and open a terminal. In the terminal, use gdisk to repartition your HD. If you have just one HD and LL will be
the only OS in it, then just create two partitions with gdisk:

NOTE: If you make a mistake/typo in any of the following, you may always
           press CTRL+C and start again.

Code: [Select]
sudo su
Code: [Select]
gdisk /dev/sda
Now, make sure you have all of your important data backed up somewhere, in an USB stick
or external HD or such, since the data will be lost from your HD when you repartition it!

Next you see:
Code: [Select]
Command (? for help):
Press key 'o' (and ENTER), to create a new empty GPT partition table.

Finally create two new partitions: /dev/sda1 and /dev/sda2.

Press key 'n' to create a new partition.
Code: [Select]
Command (? for help): n
Now, the first partition will be your root partition, so create it
almost as big as the disk is, but leave at least 16777216 sectors unallocated for swap.
And create the second partition (for swap) the same way you created the first one:

Press key 'n' to create a new partition.
Code: [Select]
Command (? for help): n
Now you may allocate the rest of the disk for swap and accept the
defaults by pressing ENTER a few times.

This is a little detail but it makes sense to change the swap partition's ( /dev/sda2 )
type, so command:
Code: [Select]
Command (? for help): t
          Partition number (1-2): 2
          Hex code or GUID (L to show codes, Enter = 8300): 8200

(And why not change the root partition's type also (if you use 64bit kernel).

Code: [Select]
Command (? for help): t
          Partition number (1-2): 1
          Hex code or GUID (L to show codes, Enter = 8300): 8304

Let's also toggle the root partition's legacy boot attribute:

Code: [Select]
Command (? for help): x
Expert command (? for help): a
          Partition number (1-2): 1
          Toggle which attribute field (0-63, 64 or <Enter> to exit): 2

If you got the message: "Have disabled the 'legacy BIOS bootable' attribute",
then toggle again, by pressing '2' again.

Finally write the new partition table to disk by pressing 'w'
Code: [Select]
Command (? for help): w
Ignore the warnings.

Now you are ready to create the filesystem and swap.
Command:

Code: [Select]
partprobe /dev/sdaThen:
Code: [Select]
mkfs.ext4 -t ext4 -m 3 -L root /dev/sda1Then:
Code: [Select]
tune2fs -c 10 -e remount-ro /dev/sda1Then initialize the swap partition:
Code: [Select]
mkswap -L swap /dev/sda2
Now you can exit the terminal and click the Install button.
When the installer comes to the partitioning, just edit the 2 entries
and DO NOT choose the 'format' option', since you already did it.
Just mount /dev/sda1 to /
and choose /dev/sda2 to be the swap partition.

Then just finish the installation.

I prefer to do this partitioning before the actual installation, since
you can fine-tune every little detail for the filesystem(s), which is
usually not possible to do when the graphical installer lets you do it.

And it may save you from a lot of time/harm, what some hardware unfortunately
may cause.

Please ask if I may be of any help?

Have fun :)

Title: Re: Error when booting: Diskfilter writes not supported
Post by: whateverthing on June 12, 2018, 12:10:07 AM
Wow @kpanic thank you for the detailed instructions! I could pretty easily re-install, so I'll give this a try.
Title: Re: Error when booting: Diskfilter writes not supported
Post by: whateverthing on June 12, 2018, 01:11:49 AM
Well, I got to the step where I create the first partition, and am not sure what option to choose here:

Code: [Select]
Warning! Main partition table overlaps the first partition by 34 blocks!
You will need to delete this partition or resize it in another utility.

Command (? for help): o
This option deletes all partitions and creates a new protective MBR.
Proceed? (Y/N): y

Command (? for help): n
Partition number (1-128, default 1):
First sector (34-30548014, default = 2048) or {+-}size{KMGTP}: 

Should I take the default value?

Also, is that warning a problem?
Title: Re: Error when booting: Diskfilter writes not supported
Post by: kpanic on June 14, 2018, 10:06:14 PM
Well, I got to the step where I create the first partition, and am not sure what option to choose here:

Code: [Select]
Warning! Main partition table overlaps the first partition by 34 blocks!
You will need to delete this partition or resize it in another utility.

Command (? for help): o
This option deletes all partitions and creates a new protective MBR.
Proceed? (Y/N): y

Command (? for help): n
Partition number (1-128, default 1):
First sector (34-30548014, default = 2048) or {+-}size{KMGTP}: 

Should I take the default value?

Also, is that warning a problem?

Hi,

That warning is quite common and you may ignore it since you are creating a new partition table anyway :)

- kpanic
Title: Re: Error when booting: Diskfilter writes not supported
Post by: kpanic on June 14, 2018, 10:16:15 PM
...and yes, you can choose the default value, which is 2048.

Can you tell me how many sectors there are ( gdisk tells this when you start it ) on your hard drive?
Title: Re: Error when booting: Diskfilter writes not supported
Post by: kpanic on June 15, 2018, 01:27:43 PM
...and yes, you can choose the default value, which is 2048.

Can you tell me how many sectors there are ( gdisk tells this when you start it ) on your hard drive?

Sorry, my mistake. When you launch 'gdisk /dev/sda', you need to press 'p' and ENTER to get
the amount of sectors in the hard drive / ssd.
Title: Re: Error when booting: Diskfilter writes not supported
Post by: whateverthing on June 16, 2018, 06:18:04 PM
@kpanic ... It reports End sector 312580095, Size 149.0 GiB.

But I'm seeing all the discussion about swap partition, that Ubuntu 18.04 uses a swap file instead. So is there a different partition plan we should consider? What about a boot partition? I don't have a good understanding partition planning, and I see many options recommended, like this (which also suggests using a swap partition):
https://www.linuxtechi.com/ubuntu-18-04-lts-desktop-installation-guide-screenshots/

And this discussion says the OS will use a swap partition if it finds one:
https://ubuntuforums.org/showthread.php?t=2390779

But is a swap file a more efficient use of drive space, since it can vary in size as needed? I don't really know the issue, I'm just guessing.

Thanks for continuing to help with advice here!
Title: Re: Error when booting: Diskfilter writes not supported
Post by: kpanic on June 17, 2018, 02:24:29 AM
@whateverthing, that's the power of Linux, things can be done in many ways. Sometimes though, this power may cause
some confusion. The reason why I prefer a swap partition instead of a swap file is, that if the Linux begins to swap, it always
makes the computer a bit ( or more ) slower. When you use a swap file, then the ext4 file system driver must do extra work
since the swap file is in the ext4 formatted partition and so it makes things even slower compared to, if you use a swap
partition, which is not formatted as ext4.

The file system driver is one of the most important parts of the Linux kernel and ext4 is very sophisticated file system and
requires a decent amount of resources from the CPU too - which is not the case with swap partition, which is much easier
for the kernel to maintain. So, it's faster and - as a bonus - it does not fragment the file system at all.

You may create many partitions, including the /boot partition but you don't need a separate /boot  partition. The boot loader
can load the kernel from the root ( / ) partition as well.

Since your HD seems to be about 149 Gb, I recommend that you create a 145Gb root partition and 4Gb swap should be enough. Here is how to do it:

First boot the installation media.

Then make sure, that LL will not auto-mount your new partitions:
Go: 'Menu' -> 'Settings' -> 'Removable Drives and Media'
And under "Removable Storage" make sure that every button is unchecked
and then close the settings.

Then open the terminal, become root and run gdisk:
Code: [Select]
sudo su  (This should be done, so that you won't need to type 'sudo' all the time...)
Code: [Select]
gdisk /dev/sda
Create empty partition table
Code: [Select]
Command (? for help): o
Create the root partition
Code: [Select]
Command (? for help): n
Accept the default partition number 1 and the default first sector 2048 by
pressing ENTER two times.

Then it asks the last sector, type '+145G' and press ENTER
Code: [Select]
Last sector (2048-312580095, default = 312580095) or {+-}size{KMGTP}: +145G
Then it asks the partitions type code, choose 8304 and press ENTER
Code: [Select]
Hex code or GUID (L to show codes, Enter = 8300): 8304
Then create swap (the second partition)
Code: [Select]
Command (? for help): n
Then it asks again the first sector and the size. This time you may choose
the defaults by pressing ENTER three times until it asks again the partitions
type code. Choose 8200 and press ENTER.

Code: [Select]
Hex code or GUID (L to show codes, Enter = 8300): 8200
Then toggle the legacy boot flag. Press 'x'
Code: [Select]
Command (? for help): x
Then 'a'
Code: [Select]
Expert command (? for help): a
Then '1'
Code: [Select]
Partition number (1-2): 1
Then '2' followed by two ENTERs
Code: [Select]
Toggle which attribute field (0-63, 64 or <Enter> to exit): 2
Now you can check how your partition layout looks like, press 'p'
Code: [Select]
Expert command (? for help): p
You should see the two partitions.
Finally write the new layout to disk, by pressing 'w' and ENTER.

Code: [Select]
Expert command (? for help): w
(Ignore the warning)

Then make sure the kernel sees the new layout by commanding
Code: [Select]
partprobe /dev/sda
Then create the ext4 filesystem
Code: [Select]
mkfs.ext4 -t ext4 -m 2 -L root /dev/sda1(Sometimes it takes some time, so please don't interrupt...)

Then create the swap
Code: [Select]
mkswap -L swap /dev/sda2
Then some fine-tuning
Code: [Select]
tune2fs -c 10 -e remount-ro -O ^dir_nlink,^huge_file /dev/sda1
Now you are ready and may exit the terminal and begin the installation.
And again, when the installer comes to the partitioning, just edit the two partition
entries. Set the /dev/sda1 partition to be ext4 and mount it to /

And set the /dev/sda2 to be the swap partition.

Do NOT check the 'format' option, since it's done already.
Then just finish the installation.

And finally as I said. Things can be done in many different ways. You may ignore these instructions
if you don't feel comfortable using the terminal - then the graphical installer does everything for you.
However, with the graphical installer you are not able to be so precise.

I hope this helps :)
Title: Re: Error when booting: Diskfilter writes not supported
Post by: whateverthing on June 17, 2018, 06:06:46 PM
I got a ways through it, but it failed at the mkfs command:

Code: [Select]
linux  ~  sudo partprobe /dev/sda
 linux  ~  sudo mkfs.ext4 -t ext4 -m 2 -L root /dev/sda1
mke2fs 1.44.1 (24-Mar-2018)
/dev/sda1 contains a LVM2_member file system
Proceed anyway? (y,N) y
/dev/sda1 is apparently in use by the system; will not make a filesystem here!
 linux  ~ 
Title: Re: Error when booting: Diskfilter writes not supported
Post by: kpanic on June 17, 2018, 10:23:42 PM
@whateverthing, did you remember to disable the automounter?

'Menu' -> 'Settings' -> 'Removable Drives and Media'
And under "Removable Storage" make sure that every button is unchecked
and then close the settings.

Also, when you create these partitions and file systems, you may as well
do it as root: just command
Code: [Select]
sudo su
...in case you are not root already for some reason.

If this does not work, then try:
Code: [Select]
umount /dev/sda1 && mkfs.ext4 -t ext4 -m 2 -L root /dev/sda1
If even this does not work, then try:
Code: [Select]
umount /dev/sda1 && wipefs -a /dev/sda1 && mkfs.ext4 -t ext4 -m 2 -L root /dev/sda1
Hopefully this helps. Just a few steps left to  do :)
Title: Re: Error when booting: Diskfilter writes not supported
Post by: whateverthing on June 18, 2018, 01:00:35 AM
I'm sure I did:
'Menu' -> 'Settings' -> 'Removable Drives and Media'
...and unchecked all Removable Storage boxes.

And after the error I checked to make sure, and they were still unchecked.
Title: Re: Error when booting: Diskfilter writes not supported
Post by: kpanic on June 18, 2018, 01:28:06 AM
@whateverthing, ok good.

Please try those two methods, which I wrote
Title: Re: Error when booting: Diskfilter writes not supported
Post by: whateverthing on June 18, 2018, 01:58:25 AM
I just tried them both. Both times it said it's not mounted, but both times it said it was in use and could not execute the commands.
Code: [Select]
linux  ~  sudo umount /dev/sda1 && mkfs.ext4 -t ext4 -m 2 -L root /dev/sda1
umount: /dev/sda1: not mounted.
 linux  ~  sudo mkfs.ext4 -t ext4 -m 2 -L root /dev/sda1
mke2fs 1.44.1 (24-Mar-2018)
/dev/sda1 contains a LVM2_member file system
Proceed anyway? (y,N) y
/dev/sda1 is apparently in use by the system; will not make a filesystem here!
 linux  ~  sudo umount /dev/sda1 && wipefs -a /dev/sda1 && mkfs.ext4 -t ext4 -m 2 -L root /dev/sda1
umount: /dev/sda1: not mounted.
 linux  ~  sudo mkfs.ext4 -t ext4 -m 2 -L root /dev/sda1
mke2fs 1.44.1 (24-Mar-2018)
/dev/sda1 contains a LVM2_member file system
Proceed anyway? (y,N) y
/dev/sda1 is apparently in use by the system; will not make a filesystem here!
Title: Re: Error when booting: Diskfilter writes not supported
Post by: kpanic on June 18, 2018, 02:31:43 AM
This is strange. Please try to boot into Safe Mode and try again.

If it succeeds in Safe Mode, then boot back to normal mode
Title: Re: Error when booting: Diskfilter writes not supported
Post by: kpanic on June 18, 2018, 03:03:21 AM
@whateverthing, if even Safe Mode does not allow you to create the ext4, then maybe LVM daemon is running
and does not let you do it.

Please try:
Code: [Select]
systemctl stop lvm2-lvmpolld.service
followed by:
Code: [Select]
kill -HUP $(cat /run/lvmetad.pid)
Title: Re: Error when booting: Diskfilter writes not supported
Post by: trinidad on June 18, 2018, 10:25:30 AM
@kpanic
 I've been following this discussion and if you come up with a solution using the LL live disk I think it should be stickied here. Your last answer is a logical suggestion but I expect that the LVM tools will just restart as soon as you try to repartition because of the sector misalignment, and even if the sector misalignment seems to resolve there is a good chance that kernel updates will rediscover it. I have experienced this behavior from Ubuntu 16.04 on an ASUS AMD box originally with a Windows 8 default OS with a 1T SATA drive. I eventually solved the issue but my solution is too ugly to recommend here. Below is some info that may or may not be worthwhile to add to the discussion. 

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=799295
http://ask.xmodulo.com/mount-lvm-partition-linux.html

TC


 
Title: Re: Error when booting: Diskfilter writes not supported
Post by: kpanic on June 18, 2018, 01:06:36 PM
@trinidad, thanks for the comment!

I don't know why his drive is 'in use' since I'm a newbie when it comes to LL or Ubuntu
installations but in my opinion, if you boot a Live system, which remains only in RAM,
it should NOT touch (or even worse, use) your hard drives in any way.
I mean, that is the whole idea of a "Live System", right?

However, if you know a solution to this particular problem, please help the guy out,
since I'm soon out of solutions to his problem...

Cheers!
kpanic
Title: Re: Error when booting: Diskfilter writes not supported
Post by: kpanic on June 18, 2018, 01:45:23 PM
Meanwhile, let me introduce a more brutal approach to this problem.

Since the partitioning succeeded, then you may as well do:
(First disable the lvm daemon(s) as I explained before. Then (as root):
Code: [Select]
dd if=/dev/zero of=/dev/sda1
The dd command does not watch other processes or existing signatures,
so it just wipes out every lvm-signatures among everything else in your root partition.

Just let it do it's job two minutes (then CTRL+C) and I'm quite sure LVM does not lock
that partition after you reboot...
Title: Re: Error when booting: Diskfilter writes not supported
Post by: trinidad on June 18, 2018, 04:32:35 PM
It was probably caused when the OP installed the 3.8 system. Just took the whole drive and went MBR and broke a Windows 32bit BIOS partition. I pulled the drive and plugged it into my one pure Linux box that has never had Windows on it and installed the system to the drive there. I plugged it back into the Windows 8 problem box, tweaked a few hardware settings and all is well with the HDD though I must hit F1 to boot. Ugly I know, but it was a long day and I got the box and drive in that condition from another person.

I tried zeroing the whole drive initially with a gparted live disk which took quite a while but then the ISO wouldn't install. Even Debian net install bailed at grub installation so it did not solve the sector misalignment issue. That's when ugly came into play. The drive can't be zeroed out of misalignment running on the offending machine once the BIOS persistent partition is corrupted. Drive must be removed from the Windows machine with the broken BIOS to do so, OR initially set up for Ubuntu from a Windows power shell which is unfortunately an option the OP no longer has.

TC
Title: Re: Error when booting: Diskfilter writes not supported
Post by: kpanic on June 18, 2018, 04:51:01 PM
@trinidad , well I have probably missed that part when he mentioned something about Windows.
And it really does not matter unless he is running a really strange hardware.

But I don't think this is the case since the HD is under 200Gb.
It would be nice to get his Linux up and working. I hope the 'dd' will
do the job - but as this is really an exceptional case, I would not bet on it

Nothing to do with Windows, BIOS or MBR. This problem has to do with some process locking access to the
hard drive and since /dev/sda1 already seems to have an LVM signature - probably from some previous installation - I guess
one possibility is that LVM still sees that partition belonging to it. That is why I want to wipe out the contents
including the meta-data from that partition.

Let us see :)
Title: Re: Error when booting: Diskfilter writes not supported
Post by: whateverthing on June 19, 2018, 02:25:04 AM
@kpanic  ... with your suggestions, I think I got through the partitioning process. I'm now installing, and got to the hard drive options, and I chose "something else." Is this what the screen should look like?

(http://imgur.com/OmGm22al.png)

When you say: tell it to mount sda1 to / do I need to do anything here? Or is it ready for me to click Install Now?
Title: Re: Error when booting: Diskfilter writes not supported
Post by: trinidad on June 19, 2018, 09:57:20 AM
@kpanic

All the advice you have given so far is thoughtful and accurate. I'm only guessing that he is on a machine with 32bit BIOS. If the memory is 2gig and the HDD small that can often be the case. It was common on such lower end hardware for there to be BIOS persistent RAM that expected a 32bit partition. Usually POST will report an addressing error when booting on such machines, and Debian will report a 32bit address breaking warning. Most of these low end BIOS allow F1 to continue booting after the POST warning if you can get the system installed. The other workaround is that dual booting usually works ok on these machines but in order to remove Windows afterwards you must first de-fragment & shrink the Windows partition, then copy it to a new partition, then format the old partition to ext4 and install Linux there, then remove Windows and add the partition space onto the new Linux partition after Linux is up and running. None of these low end BIOS machines came with a Windows installation disk. Imagine that. Your input since joining the forum has been excellent.

TC
Title: Re: Error when booting: Diskfilter writes not supported
Post by: whateverthing on June 19, 2018, 01:33:08 PM
@trinidad @kpanic Thank you again for helping me with this.

It is an old laptop, that long ago ran WinXP. Before LL4.0, I had it set up to dual-boot Linux Mint and Linux Lite 3.x. I decided to dedicate it entirely to LL4.0, and after test-running on a live USB drive, I told the installer to replace everything. It seemed to work fine, except the Grub boot error message, which I could bypass with just a few seconds delay.

I'm looking at the BIOS screen. I don't see anything about it being 32-bit specific. Is there something I should look for?
Title: Re: Error when booting: Diskfilter writes not supported
Post by: kpanic on June 19, 2018, 09:08:47 PM
@trinidad , ok, thank you for helping out!
Title: Re: Error when booting: Diskfilter writes not supported
Post by: kpanic on June 19, 2018, 09:11:56 PM
@whateverthing ,

Great, that picture looks exactly like it should be. Hopefully you got though the
installation!
Title: Re: Error when booting: Diskfilter writes not supported
Post by: whateverthing on June 20, 2018, 12:09:47 AM
Haven't finished installing yet. Was waiting to make sure it looked right.

But when I click "Install Now," it says: No Root file system is defined. Please correct this from the partitioning menu.

In that installation partition list, when I double-click /def/sda1, the pop-up says:
Use as: do not use this partition

Should I change that to one of the other options in the drop list? There's Ext4, Ext3, FAT16, FAT32, and several others. Or is there some other way I need to tell it to use it as root?
Title: Re: Error when booting: Diskfilter writes not supported
Post by: kpanic on June 20, 2018, 06:06:02 AM
@whateverthing , oh yes!

Please, edit the partition /dev/sda1 and choose it to be ext4 and ALSO choose it to mount to /
Title: Re: Error when booting: Diskfilter writes not supported
Post by: whateverthing on June 20, 2018, 02:01:12 PM
@kpanic That seemed to work. I completed installation this morning (my time), and on first reboot I didn't see any Grub error messages. I'll need to spend more time with it this evening, and I'll remove the virtual box support to speed boot time. I'll let you know how it goes!
Title: Re: Error when booting: Diskfilter writes not supported
Post by: kpanic on June 20, 2018, 02:22:06 PM
@whateverthing , that's good news, congratulations!
Title: Re: Error when booting: Diskfilter writes not supported
Post by: whateverthing on June 21, 2018, 02:09:37 AM
So far, so good. I've rebooted and still haven't seen the error I had before. I'm not sure what part of the partition and reinstall process fixed that. But thank you @kpanic for walking me through it. I've removed virtual box support, and made other adjustments as I settle into this installation.
Title: Re: Error when booting: Diskfilter writes not supported
Post by: kpanic on June 21, 2018, 06:35:03 AM
@whateverthing , no problem. If you feel that it works now, please mark this topic as solved, thank you :)

( The dd part did it in this case, since the hd had an old LVM signature on it and therefore the lvm-daemon locked access to it )