[00:07] config table fw_platformsize runtime systab [00:07] efivars fw_vendor runtime-map vars [00:07] sudo parted-l is huge [00:08] partition table is GPT [00:08] OK good. [00:08] That's all I need to know from those. [00:09] the motherboard is set to both UEFI and legacy boot. I tried running it in either of them and it didn't help [00:09] running in both was best as it showed all options in boot menu [00:09] OK. [00:09] the motherboard would detect "ubuntu" but it stayed broken no matter what I did [00:09] What all different operating systems do you have on there? [00:10] only lubuntu now [00:10] I use to have windows lubuntu and mint [00:10] w7* [00:11] Oh OK. You have an EFI partition near the very beginning of the drive, right? [00:12] I just opened a fiel from the partition that was restored from the usb and it works well [00:12] yes I have a 200mb Ext4 sda1 [00:13] bios-grub flag is unchecked (checking it didn't fix it before) [00:13] OK. And your BIOS is telling you that it can't find any OS when you try to boot? [00:13] No it lists the HDD and ubuntu as boot options [00:14] after that it would either say cannot read or write outsie hd0 or no OS found or maybe a 3rd options and entering grub rescue mode [00:14] And both options result in an error message about no OS? [00:14] yes I could test it again now but I'm sure I've tried it [00:14] OK! Good to know. Then I think you don't even have to reinstall the bootloader. I think you just need to regenerate the configuration. [00:14] Can you do "ls /mnt" real quick? It should be empty. [00:14] I mean the option would change depending on what I did to try to get it to work [00:15] nothing happened [00:15] That's fine. You're description sounds like the bootloader is working, but can't find the operating systems. This is very easy to fix. [00:16] Good. So, mount your EFI partition using "sudo mount /mnt". [00:16] right now the disk has the following: EFI, unallocated(u) 800mb, Shrinked OS part, u, backup of original size OS part, u, restored shrink OS part [00:16] , u [00:17] That's fine. Just mount the EFI partition. [00:17] (You can use "lsblk" to find your EFI partition.) [00:18] ok /dev/sda1 worked [00:18] OK. Can you tell me the results of "ls /mnt/boot"? [00:18] no such file or dir [00:18] Perfect. Do "sudo mkdir /mnt/boot [00:19] Then do "sudo mkdir /mnt/boot/grub" [00:20] Let me know whenever those are done. [00:27] done [00:28] I'd appreciate for my learning that you tell me what the commands do [00:28] ls tells you the contents of a folder. [00:29] mkdir makes a folder. [00:29] lsblk tells you what block devices (usually disk drives) are in your system. [00:29] So what we're doing right now is creating extra folders in your UEFI partition, where we'll get to put the GRUB configuration. [00:30] This should enable your system to boot. [00:31] OK, so, I'm doing some research, 'cause I'm realizing my setup is a bit weird, and I'd like things to just continue to work as normal for you once this is done. You're still restoring the backup partition, right? [00:37] No the backup partition was restored [00:37] and It works [00:37] so I have both the /home/ folder backup and a partition backup on USBs [00:38] by works I mean I can access and open files from it [00:38] OK. I've almost finished getting the final solution made, hang tight for just a sec... [00:42] I'm going to fix my table I'll be back [00:43] OK. I think I've got everything figured out, I'm doing one final test to be sure, if it works, I'll give you the commands. [00:52] Alright, whenever you're back, I'm ready. [01:07] lol [01:07] rdy [01:08] OK. "sudo grub-mkconfig -o /mnt/boot/grub/grub.cfg" [01:08] That should generate the boot configuration file and enable your system to boot again. We're not quite done yet, though. [01:10] . [01:11]  /usr/sbin/grub-probe: error: failed to get canonical path of '/cow' [01:11] Duh... what? Are you sure you didn't make a typo? [01:12] yeah [01:13] the prior command was sudo mkdir /mnt/boot/grub [01:13] Crud. I've never seen that error before in my life. [01:14] And that command runs perfectly on my system.. [01:15] I'm looking up what the error means. [01:16] Oh I see why it's gone berzerk. [01:17] Hold on, I think I've got the solution. I'm almost there. [01:21] OK, so the error appears to be because grub-mkconfig is getting confused because of our directory setup. [01:22] Can you tell me the "/dev/sd" of your main partition? [01:22] It's /dev/sda3 right? [01:24] sda4 [01:24] OK. And /dev/sda1 is your EFI partition, correct? [01:24] wouldn't mind booting to sda 2 [01:24] yes [01:24] OK. Try this: [01:25] sudo umount /dev/sda1 [01:25] sudo mount /dev/sda2 /mnt [01:25] sda1 and sda3 are shrinked versions so I would have to extent them later [01:25] sudo mount /dev/sda1 /mnt/boot/efi [01:25] sudo chroot /mnt [01:25] sudo grub-mkconfig -o /boot/efi/boot/grub/grub.cfg [01:25] exit [01:26] That should get the mounts all in the way that grub-mkconfig wants, and then let it make the config file. [01:26] last command gave sudo: grub: command not found [01:27] oh wait [01:27] Probably did a space rather than a dash [01:28] (You'll notice the new "chroot" command - this gives you a shell that believes the root directory is whatever directory you tell it. This makes it so that grub-mkconfig can find all the files it expects.) [01:29]  /usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?). [01:29] How'd it go? Did it print some output about "sourcing configuration files" and "found initrd" and stuff like that? [01:29] no [01:29] just gave what I wrote [01:30] maybe it would be easier to edit mount points in KDE [01:30] Oh I just saw that. Argh, forgot that about chroots... [01:30] nvm [01:31] OK, so type "exit", then do "sudo mount --bind /dev /mnt/dev" [01:31] Then do "sudo chroot /mnt" again. [01:32] Then do "sudo grub-mkconfig -o /boot/efi/boot/grub/grub.cfg" again. [01:35] it's doing lots of stuff now [01:35] That's a good sign! [01:35] cannot find list of partitions [01:36] Hmm. OK, sounds like we need to do another bind mount. Do "exit". [01:37] OK, my research is failing me. Bear with me while I get a test environment set up, this shouldn't take long. [01:38] OK, getting my test stuff booted. [01:39] Uploaded file: https://uploads.kiwiirc.com/files/1f8b72e2ccf6de42e9816cc3d2215e23/pasted.txt [01:41] Got it! Here's the command sequence (assuming you did the "exit" already). I'll look at your file first. [01:41] Oh wait, wrong guy's file. [01:41] @bob3 Command sequence: [01:41] @bob5 Command sequence: [01:41] sudo mount --bind /proc /mnt/proc [01:41] no that's also me [01:41] sudo mount --bind /sys /mnt/sys [01:41] sudo chroot /mnt [01:41] grub-mkconfig -o /boot/efi/boot/grub/grub.cfg [01:41] OK, I'll look at it. [01:42] got a bunch of fails will give u txt [01:42] Yeah, that's similar to what I saw. The command sequence fixed it, but I'll look at what fails you got this time. [01:42] oh wait it did find them [01:42] Do you see "found linux image" in the output? [01:42] Uploaded file: https://uploads.kiwiirc.com/files/8cc35c915b38e688efe7df528cf2dbc7/pasted.txt [01:43] yes! [01:43] Uh... you may have missed the "sudo mount --bind /proc /mnt/proc" part. [01:43] Do this: [01:43] exit [01:43] sudo mount --bind /proc /mnt/proc [01:43] I did miss it [01:43] sudo chroot /mnt [01:43] Now do grub-mkconfig again. [01:44] Upload the results when it's done and I'll tell you if it's good. [01:44] shouldn't i do the sys part first? [01:44] If you already did the sys part, you don't need to do it again. [01:44] And it doesn't matter what order you do the "mound --bind" commands in. [01:45] As long as you do them before the chroot. [01:45] think we got it [01:45] What's the output look like? (It's probably good.) [01:45] now I'll have to delete all but one of the isntalls to not get confused [01:46] Uploaded file: https://uploads.kiwiirc.com/files/8ed29f41c21c82d1e8897d80d3716135/pasted.txt [01:46] OK, there's one last step before everything's done. [01:46] Looks good! [01:46] When we're done I'd like a summary of what to do in the future for my notes [01:46] if it happens again [01:46] Alright, reboot, **remove the live ISO**, and boot into the fixed system. [01:47] And yes, I'd be happy to give you a summary. [01:48] ok when I boot all I get is ubuntu followed by STA xxxxx whatever the drive name is [01:48] dman [01:48] Does selecting an option in the menu do anything? [01:48] Or are you stuck at a "/dev/sdXY clean" something or other prompt? [01:48] ubuntu gave " error file '/boot/grub/i386-pc/normal.mod' not found, entering rescue mode... grub rescue> [01:49] I don't recall if EFI was fresh or was after running boot-repair [01:49] And confusingly, I'm not seing /dev/sda2 as an option to boot from in your grub-mkconfig output. [01:49] Oh, wait, i386-pc : the thing's trying to boot in BIOS mode. Change it to EFI mode and try again. [01:50] We just did a bunch of repairs for EFI, and now it's trying to boot with BIOS - that won't work. [01:50] holy shit I see something for the first time [01:50] Anything good? [01:50] There's an additional bios option for storage boot option control [01:50] it was set to legacy only [01:50] Yep, that's what it looked like. [01:50] noo same error [01:51] I set it to UEFI first [01:51] Even in EFI mode? And the error says "i386-pc" in it? [01:51] yes [01:51] OK, so this part will be interesting. Boot the live ISO again. We're going to do a manual bootloater install. (I've run into this same sort of thing on my systems.) [01:52] What should the mobo do? uefi only? [01:52] I could try uefi only for both options [01:52] Yes, UEFI only. Actually, do that first before booting the live ISO. [01:52] Your system keeps booting a BIOS copy of GRUB, when it needs a UEFI copy for the fixes we did to work. [01:53] Once you've got UEFI only set, reboot without the live ISO. [01:53] reboot and select proper boot device [01:53] Select your hard drive. [01:53] will select it now instead of leaving it to auto [01:53] Do you get a GRUB menu or a desktop? [01:54] only option now is ubuntu and I get same error [01:54] It worked with UEFI before it stopped working [01:54] I had a menu where I could choose lubuntu mint or windows [01:55] Yeah, sounds like something's gone awry with your bootloader. Really, at this point, it might be best to reinstall from scratch, since your system has a LOT of really weird config on it, but if we want to repair it still, we can install the bootloader. [01:55] bootloader is something in the EFI? [01:55] Sorta. It's a mini-OS that your system boots first, and it finds Linux and boots it. [01:55] It should be in your EFI partition. [01:56] (While we're at this, we should change the EFI partition to fat32 - I've never seen an EXT4 EFI partition before, so I wonder if that's part of the problem.) [01:56] OK, so boot into the live ISO. It has everything we need. [01:57] Once you're in the live ISO, open KDE Partition Manager, and reformat the EFI partition to fat32. Make sure to set the "boot" flag on it when you do that. [01:59] the thing about KDE is the only flag option is "bios-grub" [01:59] Hmm, that's odd. You're right-clicking the EFI partition, clicking Reformat, and selecting "fat32", right? [01:59] Buit I can download gnome-disk-utility [02:00] Ugh, that's awful. Use "GParted". "sudo apt install gparted" [02:00] I mean, if you're used to gnome-disk-utility, do whatever works for you, I just find it confusing and easy to make mistakes in. [02:03] where do I find this irc channel? [02:04] https://lubuntu.me/links/ [02:04] It's near the top of the page. [02:04] it's not lubuntu.net or lubuntu.me [02:04] Lubuntu.me. [02:05] got it [02:05] Lubuntu.net is an unofficial site that the Lubuntu devs have tried to get taken down. There's a whole fight over it in a bug report. [02:05] is it malicious? [02:05] Dunno, but it's incorrect for sure. [02:06] libparted error: the backup gpt table is corrupt, but the primary appears OK so that will be used [02:06] I think some former Lubuntu guy made it, and then when he left the team, he didn't let the site down. I could be wrong (probably someone else in this channel has better details) [02:06] I remember I checked these before and only the header was corrupted [02:06] then after restoring header from ehader backup all were good [02:06] Oy! That's... possibly part of your problem. [02:06] both aprtition priamry and backup were always good [02:06] so this is news [02:06] I'm guessing you've been messing with this system's partitions a lot? [02:07] a lot [02:07] I didn't save my instructions to fix this [02:07] Yeah, it *might* be fixable at this point, but you have plenty of backups. I'd recommend reinstalling from scratch and then restoring from one of your home backups. That will be far more effective and probably much faster than any repair we can do at this point. [02:09] Also, if you like messing with new operating systems like I do, you should look into virtualization. Once you're system is working again, do "sudo apt install virt-manager" and enjoy. [02:09] If I overwrite the new install aprtition with the backup, will it work? [02:09] no I had another use case [02:09] No, erase disk and install Lubuntu. If your apps don't work, we can mess with the partition backups, but otherwise, erasing the whole disk is the best bet (we need to fix that partition table error you got earlier) [02:10] (and just overwriting a partition probably won't fix it, but erasing the disk should) [02:10] (Also, anything involving multiple operating systems is leaps and bounds easier using virt-manager. It allows you to split one system into multiple virtual computers, each running its own OS. You can run two, three, or more operating systems at the same time using it.) [02:11] I'm aware but I only need 1 os [02:11] oh OK. [02:11] I was able to fix and verify that partition and header were fixed before [02:12] so shouldn't I do this instead [02:12] it sounds to me like you said onyl way to fix partition table is to wipe and reinstall [02:12] The problem is, something got your partition table messed up, and I don't know what. Trying to repair something that's this scrambled *might* work, but it's not as safe as just starting afresh. You'll still have your home backups to make your apps work. [02:13] hey it says the backup is fine [02:13] so just copy backup to primary [02:14] err backup is corrupt but primary ok* [02:15] going to use this https://www.rodsbooks.com/gdisk/repairing.html [02:15] I've never messed with partition table backups before, so I don't know what it's going to do. You probably know more than I do about this particular part of what you're doing. [02:16] It's start with checking the status here if ur curious https://askubuntu.com/questions/386752/fixing-corrupt-backup-gpt-table [02:19] oh got it's worse than last time [02:19] Uploaded file: https://uploads.kiwiirc.com/files/27c3da25203d1bdf9d244d08d8338a36/pasted.txt [02:19] going to put this here for posterity [02:19] It was all fixed before we talked... [02:20] That's really odd, because nothing that we did should have messed with the partition table... except for your copying the backup partition, but that doesn't seem like something that would do **this**. [02:20] I wonder if your main hard drive is failing. What brand is it and how long have you been using it? [02:29] @zob @bob5 Well, I hate to say it, but I have to go. I probably won't be on again for most of tomorrow, but if we run into each other again, I'd be happy to offer what help I can! [02:30] Uploaded file: https://uploads.kiwiirc.com/files/a91cf09b6da472dc0c00750f4ba4b579/pasted.txt [02:30] fixed it [02:30] it's seagate and I thought about this too now :( [02:35] I'll try a fresh wipe and install in the meantime [02:42] https://askubuntu.com/questions/386752/fixing-corrupt-backup-gpt-table [02:45] manual recovery: [02:45] sudo mount --bind /proc /mnt/proc [02:45] sudo mount --bind /sys /mnt/sys [02:45] sudo chroot /mnt [02:45] grub-mkconfig -o /boot/efi/boot/grub/grub.cfg [02:46] ls /mnt [02:47] sudo mkdir /mnt/boot [02:47] sudo mkdir /mnt/boot/grub [02:47] sudo grub-mkconfig -o /mnt/boot/grub/grub.cfg [02:54] sudo umount /dev/sda1 [02:54] sudo mount /dev/sda2 /mnt [02:54] sudo mount /dev/sda1 /mnt/boot/efi [02:54] sudo chroot /mnt [02:55] sudo grub-mkconfig -o /boot/efi/boot/grub/grub.cfg [02:55] sudo mount /dev/sda1 /mnt/boot/efi [03:00] oh I give up [03:24] it could be an usntable psu... [15:41] Any experts in remote hacking BIOS? [15:47] bob58: wrong channel [15:47] !topic [15:47] Please read the channel topic whenever you enter, as it contains important information. To view it at any time after joining, simply type /topic === root is now known as Guest6581