• I broke it!!!


    Hey all - sorry for the vague title but that was purely out of shock and slight amusement to what has happened to me! So I own an Asus zenbook flip laptop and I have installed both windows 10 and antergos which I choose between at startup via a grub menu.

    Everything was going great apart from a few minor hiccups. With being a bit familiar with Unix scripting I thought I would write myself a nice little script to rotate my wallpaper every few mins to a different one. The script simply removed the old wallpaper and downloaded a new one from a site and set it using a gettings command. I tested it manually a few times and it worked great. Time to automate it - but finding out there was no crontab in arch, I created a new service and a new timer file as per the instructions here: https://unix.stackexchange.com/questions/198444/run-script-every-30-min-with-systemd

    After reloading systemd and starting my timer a few times, it didn’t seem to work so I rebooted my machine. Now I am getting a black screen requesting me to “boot and select proper boot device”… No grub menu at all… I created my service as root user by the way.

    Have I completely ruined my dual boot setup?! Or is there anyway I can recover from this via the bios settings? Although annoying as I had set things up, I don’t mind installing antergos again. I am worried though about losing my windows partition because I have to bootloader for Windows (no spare cd or optical drive).

    Any help is greatly appreciated!!!

    Thanks,
    Ell

  • At this point, you need to make yourself a liveUSB and boot into it. And see what’s there…

  • No worries will do thanks for that.

    If I boot from USB though won’t it get to erase the OS data I currently have on disk automatically?

  • If I boot from USB though won’t it get to erase the OS data I currently have on disk automatically?

    No, it wont erase anything.

    I just want to make sure. Just boot into the LiveUSB. Do not attempt to install Antergos.

  • OK great thanks. I’ll follow the instructions here then:
    https://antergos.com/wiki/uncategorized/create-a-working-live-usb/

  • Right I’ve managed to login to the live USB I created. Currently in a terminal as root using the “try it” option. Does anybody have any pointers as to where I go from here? Doing an fdisk -l I can see the partitions still look okay apart from a message: Partition table entries are not in disk order.

  • I am thinking that I should just follow this here? Not sure if it would solve my problem?
    https://antergos.com/wiki/miscellaneous/how-to-fix-grub-with-efi-boot/

    The output of my fdisk -l on my live boot ‘Try it’ (cnchi) option is as follows:

    -bash-4.4# fdisk -l
    Disk /dev/sda: 119.2 GiB, 128035676160 bytes, 250069680 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: gpt
    Disk identifier: E2E9264C-DBB3-4E29-A50D-33642FA83E2A
    
    Device         Start       End   Sectors  Size Type
    /dev/sda1       2048    534527    532480  260M EFI System
    /dev/sda2     534528    567295     32768   16M Microsoft reserved
    /dev/sda3     567296 126167039 125599744 59.9G Microsoft basic data
    /dev/sda4  249047040 250068991   1021952  499M Windows recovery environment
    /dev/sda5  126167040 184760789  58593750   28G Linux filesystem
    /dev/sda6  184760790 192573289   7812500  3.7G Linux filesystem
    /dev/sda7  192573290 231635789  39062500 18.6G Linux filesystem
    
    Partition table entries are not in disk order.
    
    
    Disk /dev/sdb: 28.7 GiB, 30752000000 bytes, 60062500 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x3393103b
    
    Device     Boot Start     End Sectors  Size Id Type
    /dev/sdb1  *        0 3749919 3749920  1.8G  0 Empty
    /dev/sdb2         224  131295  131072   64M ef EFI (FAT-12/16/32)
    
    
    Disk /dev/loop0: 1.7 GiB, 1803796480 bytes, 3523040 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes```
  • This post is deleted!
  • df -hT will tell you what is mounted and where

  • @pilnet123 said in I broke it!!!:

    I am thinking that I should just follow this here? Not sure if it would solve my problem?
    https://antergos.com/wiki/miscellaneous/how-to-fix-grub-with-efi-boot/

    The output of my fdisk -l on my live boot ‘Try it’ (cnchi) option is as follows:

    -bash-4.4# fdisk -l
    Disk /dev/sda: 119.2 GiB, 128035676160 bytes, 250069680 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: gpt
    Disk identifier: E2E9264C-DBB3-4E29-A50D-33642FA83E2A
    
    Device         Start       End   Sectors  Size Type
    /dev/sda1       2048    534527    532480  260M EFI System
    /dev/sda2     534528    567295     32768   16M Microsoft reserved
    /dev/sda3     567296 126167039 125599744 59.9G Microsoft basic data
    /dev/sda4  249047040 250068991   1021952  499M Windows recovery environment
    /dev/sda5  126167040 184760789  58593750   28G Linux filesystem
    /dev/sda6  184760790 192573289   7812500  3.7G Linux filesystem
    /dev/sda7  192573290 231635789  39062500 18.6G Linux filesystem
    
    Partition table entries are not in disk order.
    
    
    Disk /dev/sdb: 28.7 GiB, 30752000000 bytes, 60062500 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disklabel type: dos
    Disk identifier: 0x3393103b
    
    Device     Boot Start     End Sectors  Size Id Type
    /dev/sdb1  *        0 3749919 3749920  1.8G  0 Empty
    /dev/sdb2         224  131295  131072   64M ef EFI (FAT-12/16/32)
    
    
    Disk /dev/loop0: 1.7 GiB, 1803796480 bytes, 3523040 sectors
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes```
    

    Yeah, use that. It is better.

  • @psscnp142 Thanks for those steps. I tried it but I am getting an error with the grub-mkconfig command :

    [[email protected] /]# grub-mkconfig -o /boot/grub/grub.cfg
    Generating grub configuration file …
    WARNING: Failed to connect to lvmetad. Falling back to device scanning.
    grub-probe: error: cannot find a GRUB drive for /dev/sdb1. Check your device.map.
    done

    Is there something I’ve done wrong or something I am overlooking here?

  • Follow this, https://antergos.com/wiki/miscellaneous/how-to-fix-grub-with-efi-boot/. Ignore my answer.

    If they don’t work. Try “–force” option in grub-install.

    If it still doesnt work. Have a look at this:
    https://www.pckr.co.uk/arch-grub-mkconfig-lvmetad-failures-inside-chroot-install/

  • Thanks for that, but how do I map my root, boot and efi partitions to their associated /dev/s* devices?

  • Use lsblk.

  • My output for lsblk is as follows:

    [[email protected] ~]$ lsblk
    NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
    loop0 7:0 0 1.7G 1 loop /run/archiso/sfs/root-image
    sda 8:0 0 119.2G 0 disk
    ├─sda1 8:1 0 260M 0 part
    ├─sda2 8:2 0 16M 0 part
    ├─sda3 8:3 0 59.9G 0 part
    ├─sda4 8:4 0 499M 0 part
    ├─sda5 8:5 0 28G 0 part
    ├─sda6 8:6 0 3.7G 0 part
    └─sda7 8:7 0 18.6G 0 part
    sdb 8:16 1 28.7G 0 disk
    ├─sdb1 8:17 1 1.8G 0 part /run/archiso/bootmnt
    └─sdb2 8:18 1 64M 0

    I think sdb is my external USB pen which I have plugged in (it is what I am using to live boot into Antergos). So looking at https://antergos.com/wiki/miscellaneous/how-to-fix-grub-with-efi-boot/ I am really not sure what to replace with what.

    First step: “mount System to /mnt” - I assume this is simply running the below command?:
    $ mount /mnt

    Then as for the partitions in these steps:
    mount /dev/sdXn /mnt >> / root partition
    mount /dev/sdXn /mnt/boot >>> /boot partition
    mount /dev/sdXn /mnt/boot/efi >>>>> the EFI-boot (fat) partition

    Going on the output of my fdisk -l - I can only assume /root partition is /dev/sda5, EFI is /dev/sda5 - and as for the boot partition - I am not sure.

  • Just to point out - I followed the instructions here when setting up my dual boot system:
    https://itsfoss.com/dual-boot-antergos-windows-uefi/

    So I am not sure whether or not my root and boot partitions are in fact the same? (i.e. sda5 - I am guessing)

  • lsblk doesnt recognize the partitions because you are booting from a live disk.

    You should mount each /dev/sdaX and see what’s in there. !Do not guess! You may break your system even worse.

  • Thanks for the response. Oh man, so it isn’t going too well :( I tried the instructions in the link. I mounted /dev/sda5 to /mnt. I also mounted /dev/sda1 to /mnt/boot/efi (so underneath this directory was sub directory EFI with contents). I ran the arch root and grub install commands and shut down, took my USB out and started up. Now I am in the grub command line menu. I think I did something wrong…but now I am stuck in this command line screen as it doesn’t boot from my live USB by default.

  • Thanks for the help anyway but I think I’m just going to have to do everything from scratch now :(. After playing about with the grub command line for ages now I am having no luck whatsoever. What is annoying though is all my file systems are there and seem to be intact! Unless anyone has any other suggestions at all I’ll have to just try reinstalling everything from scratch.

  • @pilnet123
    Hi!
    If you have different partitions to /root and /home then you don’t need to format your /home partition while reinstalling Antergos. With that i mean you’ll need to install all the programs you want, but your config files and personal files will remain intact.

    Antergos (default OS) - WIN10 (abandoned)
    I3wm - Mate desktop
    AMD - A4 7300 Radeon graphics
    16 GB ram
    HD 1 TB
    Linux newbie since 06/2016

broke13 Posts 44Views 1387
Log in to reply