Hello, I'm still trying if I could get a quick help or so

Hello, I have ever posted my Rocky Linux 9 got broken down, and what I got is to reinstall Rocky, which I do not quite pleased with this suggestion. Because I think I wanted to fix it instead of replacing it. If every time I met up with an trouble I always replace system, this is too useless.

Here I once again state how the Rocky 9 got broken down. At the time I was accepting a work that needs a Windows then I divide part of the partition of Rocky 9. Next day I open up Rocky 9, found out it went broken down. At first, the Rocky Linux 9 executed the operation normally to divide a partition for a Windows, the next time when I trying to use it, it got no working. How come this logic go through, let’s say you are (the machine) executing everything well, how come the next time you(the machine) went no working any more. Another way expressing this situation is if the operation is going to cause something broken down, the system should at the beginning to stop this action. I hope I have well expressed what I wanted to say.

If someone have an idea of how to solve this, please teach me. Thank you

How?
What kind of partitions and filesystems you had before?

AFAIK, the default setup is such that an operation like that is not trivially possible.


True, an “I’m sorry, Dave. I’m afraid I can’t do that” would add some safety.

However, there are tools that are designed to give raw power and not question the insanity of the user. They have their place too – for some users.


Depends on problem. Some changes are feasible to undo. Massive corruption of data is not one of them.

When OS boots, it loads things into RAM and “runs” there. They can keep running as long as there is no need to access the filesystem. Hence some things can happen to some filesystems without immediate effect. On next boot – on the reload – the issues are more likely to show.

If you’re doing something that requires you to use Microsoft Windows on your Linux computer, another (probably simpler) option is to install something like Oracle’s Virtualbox and run Windows on that. Then your Windows installation is pretty much just another program that you’re running on your Linux computer.

1 Like

Messing with partitions is not recommended, and anyway you didn’t show the exact commands used, nor did you save the partition table before messing with it? So fixing it would be difficult.

If you have the original partition offsets, and wrote down the exact commands you used, it may be possible to repair it, but it’s likely some block has been overwritten by now.

1 Like

OK. Thank you for that suggestion. I might practise this next time.

Basically, I followed online structions using the system’s allied software: it should be Disk Partition Tool to divide a partition on Rocky 9. It was telling to mounted the device so that could be divided. I should have followed this. And by the way, actually the computer now has 3 partitions, the first partition is Kali(can’t use also), the second partition Rocky 9(Windows come from Rocky), now the third Windows. Thank you for trying to help. Now you see is the Rocky still fixable?

Thank you for every detail explanation. I quite learned much from that. Basically, when I set up Rocky, I followed the default set up, I didn’t quite understand all of those things, I just followed it step by step. The Rocky 9 is the second partition of my computer, now the Windows is the third one partition came from Rocky. For what kind of the partition or filesystem, since I don’t understand them, they are the original options when I set them up.Now you see could that still be able to fix?

Here’s an example of some commands I used to mess about with partitions in the past, it won’t help fix your system, it’s just to show the type of detail you need.

parted /dev/nvme0n1 unit "s" print free
Number  Start       End         Size        File system  Name                  Flags
        34s         2047s       2014s       Free Space
 1      2048s       1230847s    1228800s    fat32        EFI System Partition  boot, esp
 2      1230848s    3327999s    2097152s    ext4
 3      3328000s    164825087s  161497088s                                     lvm
        164825088s  488397134s  323572047s  Free Space
partition 3 indicates it uses lvm
in this case, there's one PV of size 161497088 sectors
compare this to the output from 'pvs'
pvs --units s
/dev/nvme0n1p3 cl  lvm2 a--  161488896S 8192S
note that the last char is 'S', so 161488896+8192=161497088	// agrees
obtain more detail on the PV
pvdisplay --units s /dev/nvme0n1p3
	member of one VG called 'cl', size is 8192x19713+8192=161497088 (one free, one unused)

OK, thank you for that, I would try to understand what it is and learned something from it. I remember that normally when I set up system I chose either fat32 or ext4, but I don’t quite get what they are what that means for. I would take my time learning more knowledge on Linux system. Thank you. Thank you everyone offering your help and explanations!

Hello Soilandseed,

I’m trying to understand what exactly is goal.

You wanna install Windows (10-11) beside one or more Linuxes on one disk, right?

You have several options:

Use whole disk for Rocky Linux 9.x better 10.1, install KVM/Qemu and install WIN11 and all other Linuxes in Virtual Machines.

Follow this great instruction to install WIN11 in KVM:

Install WIN11 in KVM

OR: install WIN11 on first partition and other Linuxes in additional partitions BEHIND WIN11 and install grub2 to handle the OSes during boot.

Dualboot WIN11 and Linux

Hope this is what youre looking for.

Kind regards

Rudi

Hello Rudi,

Thank you your kind suggestion, it is just that there were originally Kali and Rocky, (Kali is also not working now due to shut down with loads of apps opening, ) and once upon a time that I was requested to install Windows for interpreting work that I then divided a part of Rocky to Windows. It was running well when executing dividing partition, the next time I booted into Rocky it then went no working any more. Things are like this. I’ll take your advice the next time when I’m in need of those executions. Thank you.

How did you repartition in the first place? Normally you need a Live Media for that as when you are running the OS from the disk you are repartitioning at the same time, this usually can’t be done, except with special Software. You also mentioned “FAT32”, that is a File-System you should never use, as it is unreliable & has no transaction logs. It should only be used as the EFI boot partition, as UEFI requires it. But that partition only has some EFI files on it! If you change that partition you risk corrupting that partition.

If you want to change partition sizes, then download GParted, boot from that ISO (via USB Stick), & then you can usually easily change Partitions without too much risk to your data.

A link to those instructions would be helpful.
What are “system’s allied software” and “Disk Partition Tool”?

I firstly should have installed the Kali,then maybe like you say I used a usb stick to have another partition for Rocky; then Rocky divided one other part for Windows. I don’t quite understand the latter part of your explanation, would you might explain a little more detail, maybe you can explain file-system, uefi and efi to me, thanks. I think you do have a good advice for me, for now, Windows got around 50 GB, that is a little small, I was intended for enlarging it; I might use Gparted to do so. Thank you a lot for that advice. For now, I think I might also want to check some information to fix it. I don’t quite rush for that since I want to learn Computer Science.

Those instructions link had long been before, and I do not keep a copy of them. ‘System’s allied software or Disk partition software’, I mean there should be a self software associated with Rocky Linux 9, it’s not third party app or need to download online, when I installed the Rocky I already seen it there in Rocky. Its name if I remember correctly should be called ‘Disk Partition Tool’, or that software is not this name?

Basically I kind of understand the instruction, the instruction says first make your system mounted/unmounted(I did not quite understand mounted or unmounted, either option is used for dividing partition, for doing this first step then your system could be able to divide a partition),after doing mounted or unmounted then the system Rocky is able to be divided for an other partition, for doing those execution, the system should have been separated the file system files apart from free space/clean space,where this space is abe to be used for Windows in the meantime not hurting Rocky. This is what the instruction says and I should have before used similar information divided a part from Kali to Rocky,no thing went wrong at that time.

Imagine a street in new, unbuilt suburb. There are empty land lots along it. Let say numbered 1-10.
In real life people would buy one lot and build a house on it. Some magistrate has a list on who owns which lot.

On storage media the “list” is called “partition table”. It is stored in some lot, so no “regular houses” can be built on that lot. A lot is called logical block. The number of lot is address, “LBA”.

Rather than buying one lot, many consecutive lots are allocated for one partition.
For example, “lots 2-5 are for Kali and lots 6-10 are for Rocky”.
That would be “a partition uses LBAs 2-5, and another partition uses LBAs 6-10”.

The “owner” then “builds a house”, big house, that uses all real estate from the consecutive lots. That “house” is a filesystem. A filesystem has both metadata that tells where things are within it and the actual file data. The metadata is like the walls and plumbing, and files are all the things you store in the house.

However, the default Rocky install is not in partition. It is more like:

  • partition for /boot in lot 6
  • partition for LVM PV in lots 7-10

Within that “LVM PV” are logical volumes. Like partitions, but their magistrate is elsewhere.

  • LV for the /, in lot 7
  • LV for /home, in lots 8-9
  • LV for swap, in lot 10

If you have a house that spans lots 7-10 and you want to sell the lots 9-10 to “Windows”, then what do you do? Logically:

  1. Move your things away from one end of the house
  2. Bulldoze part of the house to make some lots vacant and patch up the missing wall, etc
  3. Call magistrate to update that your 7-10 is now just 7-8

If you did call the magistrate first (update partition table), then Windows was able move in and build its house on top of part of yours, like yours (and things in it) weren’t there.

The default filesystem in Rocky is XFS and XFS does not have “move things inside the house and move outer wall to remove a room” option. It has only “take everything out, remove the house, build new, and put things back in” option.


In other words you cannot tell what the exact instructions were, which makes it impossible for us to know whether they were even approriate.
Furthermore, you don’t seem remember the exact steps that you did actually take?


Can you run lsblk and lsblk -f in Kali?

PC’s/Servers generally have two types of BIOS, the old, traditional BIOS, & the new, UEFI BIOS. If you have a UEFI BIOS, which is the case with all newer Systems, Windoze OS’s need the HD it boots from to have a GPT partition table, along with a small fat32 Partition for the EFI boot files. Linux also uses that partition.

Also, Windoze 11 requires an UEFI BIOS, it won’t install on conventional BIOS’es. Besides that it requires a TPM 2.0 Chip & will only run on a certain selection of CPU’s.

I have a dual boot Windows 10 and Rocky 9 system. I found that when switching between Windows and Rocky, I need to perform a full shutdown of Windows, and THEN power back up to run Rocky. If I do not do this, then Windows will NOT BOOT the next time, and will HANG while showing the initial blue window image on the screen. I believe that this has something to do with the Windows “Fast Startup” feature, which expects some state-information to reside on the disk between reboots. Perhaps Windows stores a hibernation image, even if hibernation is not enabled. Rocky allegedly overwrites this information. When the system won’t reboot, one might think that something is broken. However, if you power down and restart again, Windows will boot up fine, because upon power up, it does not expect to see a previous image. I do knot know if the Linux Kernel can be modified to recognize that the system was rebooted after running Windows, and preserve the state information. I don’t believe that disabling “Fast Startup” prevents this from happening.
(corrected terminology above: Fast Startup … not Fast Boot)

Also note that Rocky will mount Windows drives as read-only if the Fast Startup image exists between reboots. Powering down between reboots prevents this and allows read-write access to Windows drives mounted by Rocky in a dual-boot environment.

FYI, I set the BIOS boot device to boot using Rocky’s GRUB, then select Windows from the GRUB menu. I found the Windows boot loader to be over-complicated.

So you followed unofficial instructions, and used some unofficial tool and now it’s broken?