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.
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.
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!
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.
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:
Move your things away from one end of the house
Bulldoze part of the house to make some lots vacant and patch up the missing wall, etc
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?
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.