0

I am trying to do boot-repair using try Ubuntu from live disc. I need to do apt commands, however I keep getting:

Media change: please insert the disc labeled
 'Ubuntu 21.04 _Hirsute Hippo_ - Release amd64 (20210420)'
in the drive '/cdrom/' and press [Enter]

I have seen a solution about removing cdrom entries from /etc/apt/sources.list, so I did. Now my lists are only 4 active entries, none is cdrom:

ubuntu@ubuntu:~$ grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/*
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu/ hirsute main restricted
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu/ hirsute-security main restricted
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu/ hirsute-updates main restricted
/etc/apt/sources.list.d/yannubuntu-ubuntu-boot-repair-hirsute.list:deb http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu/ hirsute main
/etc/apt/sources.list.d/yannubuntu-ubuntu-boot-repair-hirsute.list:# deb-src http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu/ hirsute main

I have also checked UI to make sure that option to use CD is NOT selected and I have done sudo apt-get update multiple times, however I keep getting the same error. Do you know how to remove this error message? Or is it impossible to get rid of on live version?

The command I am trying to run is:

sudo chroot "/mnt/boot-sav/sdb5" apt-get purge --allow-remove-essential -y grub*-common shim-signed
Rad
  • 25
  • Why would you run that command? You're going to remove many dependencies along with those packages. If you are going to purge and reinstall a package, you can use dpkg to purge instead and then use apt to reinstall. This way, it will not remove dependencies. – mchid Aug 01 '21 at 22:15
  • You're confused. Editing sources.list on your Ubuntu Live DVD does no good. What does boot-repair have to do with running (dangerous) cli commands? What makes you want to run those commands anyway? – heynnema Aug 01 '21 at 23:18
  • I have a problem with dual booting. I am trying to fix it using boot-repair. That's why it needs to remove grub from live cd and then install it again. There was a step where I should execute commands to remove grub manually. – Rad Aug 02 '21 at 06:17
  • 1
  • @N0rbert No, I have tried unticking this option in UI and removing entry from sources.list (after which I did apt update), both did not work – Rad Aug 02 '21 at 07:24

0 Answers0