That seems to work.
With all the juggling around of the order of things to do in the two guides, have I made any obvious errors in the following commands? This includes redoing the last two sections in the original post in a different order but otherwise continues from there and seems to work other than that I still have to enter the passphrase twice, and it uses a US keymap rather than a Danish one for the first of those prompts, but these are at least obvious problems that are easy enough to work on, I’m more worried about having done something wrong that’s non-obvious.
# Installation guide, Installation, Install the base packages
packstrap /mnt base base-devel vim
# Installation guide, Installation, Configure the system, Fstab
genfstab -U /mnt >> /mnt/etc/fstab
# Installation guide, Installation, Configure the system, Chroot
arch-chroot /mnt
# Installation guide, Installation, Configure the system, Time zone
ln -sf /usr/share/zoneinfo/Europe/Copenhagen /etc/localtime
# Installation guide, Installation, Configure the system, Localization
vim /etc/locale.gen
# Uncomment en_US.UTF-8 UTF-8 and other needed locales in /etc/locale.gen, and generate them with:
locale-gen
# Set the LANG variable in locale.conf(5) accordingly, for example:
vim /etc/locale.conf
# LANG=en_US.UTF-8
# If you set the keyboard layout, make the changes persistent in vconsole.conf(5):
vim /etc/vconsole.conf
# KEYMAP=dk-latin1
# Installation guide, Installation, Configure the system, Network configuration
vim /etc/hostname
# lenovo-u41-70
vim /etc/hosts
# 127.0.0.1 localhost
# ::1 localhost
# 127.0.1.1 lenovo-u41-70.localdomain lenovo-u41-70
pacman -S networkmanager
systemctl enable NetworkManager
# dm-crypt/Encrypting an entire system, Encrypted boot partition (GRUB), Configuring mkinitcpio
vim /etc/mkinitcpio.conf
# Change HOOKS line to:
# HOOKS=(base systemd autodetect keyboard sd-vconsole modconf block sd-encrypt sd-lvm2 filesystems fsck)
# Installation guide, Installation, Configure the system, Initramfs
mkinitcpio -p linux
# Installation guide, Installation, Configure the system, Root password
passwd
# dm-crypt/Encrypting an entire system, Encrypted boot partition (GRUB), Configuring GRUB
pacman -S grub efibootmgr
grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=GRUB --recheck
grub-install --target=i386-pc --recheck /dev/sda
# Configure GRUB to recognize the LUKS encrypted /boot partition and unlock the encrypted root partition at boot:
vim /etc/default/grub
# GRUB_CMDLINE_LINUX="... rd.luks.name=<sda4-UUID>=cryptlvm" ...
# GRUB_ENABLE_CRYPTODISK=y
grub-mkconfig -o /boot/grub/grub.cfg
# Use workaround if grub-mkconfig hangs: https://bbs.archlinux.org/viewtopic.php?pid=1820949#p1820949
# dm-crypt/Encrypting an entire system, Encrypted boot partition (GRUB), Configuring fstab and crypttab
dd bs=512 count=4 iflag=fullblock if=/dev/random of=/etc/mykeyfile
chmod 600 /etc/mykeyfile
cryptsetup luksAddKey /dev/sda3 /etc/mykeyfile
vim /etc/crypttab
# cryptboot /dev/sda3 none luks
vim /etc/crypttab
# cryptboot UUID=<UUID identifier of crypto_LUKS partition on sda3> /etc/mykeyfile
vim /etc/fstab
# /dev/mapper/cryptboot /boot ext4 defaults 0 2
vim /etc/pacman.conf
# It may be worth considering to add the GRUB bootloader to the ignore list of /etc/pacman.conf in order to take particular control of when the bootloader (which includes its own encryption modules) is updated.
# Installation guide, Installation, Configure the system, Boot loader
pacman -S intel-ucode
grub-mkconfig -o /boot/grub/grub.cfg
# Installation guide, Installation, Reboot
exit
umount -R /mnt
reboot
# TODO:
# Installation guide, Installation, Post-Installation
# Fix keymap for GRUB stage 1 https://bbs.archlinux.org/viewtopic.php?id=240739
# Fix having to enter passphrase twice to boot.
# WiFi https://wiki.archlinux.org/index.php/Network_configuration
# Suspend to disk https://wiki.archlinux.org/index.php/Dm-crypt/Swap_encryption#With_suspend-to-disk_support
# https://wiki.archlinux.org/index.php/General_recommendations
# See tip about cryptboot after install. https://wiki.archlinux.org/index.php/Dm-crypt/Encrypting_an_entire_system#Encrypted_boot_partition_(GRUB)
Last edited by BearerOfHonesty (2019-01-08 03:09:00)
Ответ на:
комментарий
от fresa 13.01.21 15:31:58 MSK
Ответ на:
комментарий
от PURGEN143 13.01.21 15:34:07 MSK
Ответ на:
комментарий
от fresa 13.01.21 15:42:56 MSK
Ответ на:
комментарий
от PURGEN143 13.01.21 15:44:21 MSK
как то ты поперёк ман читаешь, там же написано что нужно создать /есп/ефи
fresa ★
(13.01.21 15:50:01 MSK)
- Ссылка
я использую refind (тоже арчик), потому точно не подскажу. единственное, что в --efi-directory=
, ты должен указать путь к директории с прошивкой. у меня выглядит так:
/dev/nvme0n1p2 312M 60M 253M 20% /boot
/dev/nvme0n1p1 200M 1,2M 199M 1% /boot/EFI
Ну, т.е. в твоём случае /dev/sda1 — должен быть efi раздел, /dev/sda2 — boot раздел и подмонтирован /dev/sda1 в /boot/EFI. Это и надо указать скорее всего (/boot/EFI), если ты примонтировал всё как надо.
Пакет efibootmgr так же должен быть установлен.
fehhner ★★★★★
(13.01.21 15:54:24 MSK)
- Показать ответ
- Ссылка
Ответ на:
комментарий
от fehhner 13.01.21 15:54:24 MSK
Да, щас вот допер и сделал все как вы озвучили. Теперь
installing for x86_64-efi platform.
Grub-install: error: failed to get canonical path of "airootfs"
- Показать ответ
- Ссылка
Ответ на:
комментарий
от PURGEN143 13.01.21 15:34:07 MSK
Ответ на:
комментарий
от cica 13.01.21 16:01:00 MSK
grub-install /boot/efi
anonymous
(13.01.21 16:27:40 MSK)
- Ссылка
Ответ на:
комментарий
от PURGEN143 13.01.21 15:57:09 MSK
Grub-install: error: failed to get canonical path of «airootfs»
Видимо, граб не может получить какие-то переменные окружение. Попробуй всё примонтировать и повторить уже в чруте (сначала arch-chroot).
fehhner ★★★★★
(13.01.21 16:29:06 MSK)
- Ссылка
Ответ на:
комментарий
от PURGEN143 13.01.21 16:08:05 MSK
Ты пытаешься поставить груб не примонтировав корень или не чрутнувшись в него
anonymous
(13.01.21 16:31:11 MSK)
- Показать ответ
- Ссылка
Ответ на:
комментарий
от anonymous 13.01.21 16:31:11 MSK
то есть мне в /esp запихать корневой раздел, потом в /esp/efi запихать ефи и chroot /esp?
- Показать ответ
- Ссылка
Ответ на:
комментарий
от PURGEN143 13.01.21 16:33:07 MSK
Нет, в вики же все расписано. Монтируешь корень в /mnt арчрут в /mnt потом монтируешь ефи раздел в /efi или если так хочешь в /esp и ставишь груб
anonymous
(13.01.21 16:36:58 MSK)
- Показать ответ
- Ссылка
Ответ на:
комментарий
от anonymous 13.01.21 16:36:58 MSK
Прими пургена, может полегчает
anonymous
(13.01.21 16:46:49 MSK)
- Ссылка
Я просто пишу grub-install /dev/nvme0n1
. ESP смонтирован в /boot/efi.
anonymous
(13.01.21 16:51:07 MSK)
- Показать ответ
- Ссылка
Ответ на:
комментарий
от PURGEN143 13.01.21 16:46:31 MSK
Ответ на:
комментарий
от anonymous 13.01.21 16:56:15 MSK
Ответ на:
комментарий
от anonymous 13.01.21 16:51:07 MSK
Если б так просто. Я уже за вечер весь мозг себе вытрахал этим грабли, самому смешно аж
- Показать ответы
- Ссылка
Ответ на:
комментарий
от PURGEN143 13.01.21 16:57:46 MSK
да чтож такое а. чрут сделал? ефи примонтировал? ядро в бут лежит? как не видит, елки-палки, ты что-то делаешь не так.
anonymous
(13.01.21 17:02:30 MSK)
- Показать ответ
- Ссылка
Ответ на:
комментарий
от PURGEN143 13.01.21 16:59:54 MSK
забей на груб и всего делов. используй efistub!
anonymous
(13.01.21 17:03:30 MSK)
- Ссылка
Ответ на:
комментарий
от PURGEN143 13.01.21 16:57:46 MSK
А ты оспробер поставил , чтоб он находил? С таким чтением вики ты и ядро мог не поставить.
Читай еще раз русскую вики по грубу, там все расписано.
И можешь загрузить арч и из своего груба вручную, конечно если ядро поставил.
В вики даны команды консоли груба.
anonymous
(13.01.21 17:08:04 MSK)
- Показать ответы
- Ссылка
Ответ на:
комментарий
от anonymous 13.01.21 17:08:04 MSK
Ответ на:
комментарий
от anonymous 13.01.21 17:02:30 MSK
Чё делал
sudo mount /dev/sda5 /mnt
Chroot /mnt
Sudo mount /dev/sda1 /mnt/efi
Sudo grub-install
Sudo update-grub
С телефа чет коды не работают, сорян за такую пасту
PURGEN143 ★
(13.01.21 17:46:42 MSK)
Последнее исправление: PURGEN143 13.01.21 17:48:35 MSK
(всего
исправлений: 2)
- Показать ответы
- Ссылка
Ответ на:
комментарий
от anonymous 13.01.21 17:08:04 MSK
Арчем я уже пользуюсь недели 3, так что ядро там стоит
PURGEN143 ★
(13.01.21 17:51:27 MSK)
Последнее исправление: PURGEN143 13.01.21 17:52:01 MSK
(всего
исправлений: 1)
- Ссылка
Ответ на:
комментарий
от PURGEN143 13.01.21 17:46:42 MSK
че за sudo?
короче… надо как-то так:
mount /dev/sda2 /mnt
mount /dev/sda1 /mnt/boot/efi
cd /mnt
mount -t proc /proc /mnt/proc
mount --rbind /sys /mnt/sys
mount --rbind /dev /mnt/dev
mount --rbind /dev/pts /mnt/dev/pts
mount --rbind /run /mnt/run
mount --rbind /sys/firmware/efi/efivars /mnt/sys/firmware/efi/efivars
chroot /mnt /bin/bash
grub-install /boot/efi
grub-mkconfig -o /boot/grub/grub.cfg
anonymous
(13.01.21 18:00:42 MSK)
- Показать ответы
- Ссылка
Ответ на:
комментарий
от PURGEN143 13.01.21 17:46:42 MSK
Ну а конфиг груба кто генерировать будет, еще раз прочти вики.
И если не можешь простейшие действия по вики повторить, арч пока рано
anonymous
(13.01.21 18:01:46 MSK)
- Показать ответ
- Ссылка
Ответ на:
комментарий
от anonymous 13.01.21 17:19:46 MSK
Чтоб другие оси находил. Но ТС и основной конфиг не сгенерировал
anonymous
(13.01.21 18:03:23 MSK)
- Ссылка
Ответ на:
комментарий
от anonymous 13.01.21 18:00:42 MSK
В арче есть arch-chroot он сам монтирует proc run и прочее
anonymous
(13.01.21 18:05:08 MSK)
- Показать ответ
- Ссылка
sudo shred /dev/sda тебе поможет, но это не точно.
anonymous
(13.01.21 18:08:02 MSK)
- Ссылка
Ответ на:
комментарий
от anonymous 13.01.21 18:05:08 MSK
ну и пусть будет. новичку лучше мотировать все ручками, потом пригодиться.
anonymous
(13.01.21 18:08:12 MSK)
- Ссылка
Ответ на:
комментарий
от anonymous 13.01.21 18:01:46 MSK
Да чё рано, как будто если я запорю граб на убунте то его будет проще восстановить. Поставил арч как-то, юзаю, прикольно
- Показать ответ
- Ссылка
Ответ на:
комментарий
от PURGEN143 13.01.21 18:12:40 MSK
Ну так читать тогда и читать вики, установка груба из лайва арча четыре команды подряд.
А ты и в них запутался.
anonymous
(13.01.21 18:14:58 MSK)
- Ссылка
Ответ на:
комментарий
от PURGEN143 13.01.21 16:59:54 MSK
Именно так просто работает в Ubuntu и Debian.
anonymous
(13.01.21 18:27:20 MSK)
- Ссылка
Ответ на:
комментарий
от anonymous 13.01.21 18:00:42 MSK
Достаточно
mount -t sysfs none /mnt/sys
mount -t proc none /mnt/proc
mount --bind /dev /mnt/dev
Размахивать --rbind
ни к чему, это даст только неудобства с отмонтированием /dev/pts/. /sys/firmware тут тоже само подтянется.
anonymous
(13.01.21 18:31:11 MSK)
- Ссылка
Ответ на:
комментарий
от anonymous 13.01.21 18:00:42 MSK
Ответ на:
комментарий
от PURGEN143 13.01.21 18:37:17 MSK
в первом же комменте лучшее решение, чем systemd-boot не подходит?
☆
(13.01.21 18:44:05 MSK)
- Показать ответ
- Ссылка
Ответ на:
комментарий
от d09 13.01.21 18:44:05 MSK
Ответ на:
комментарий
от anonymous 13.01.21 18:39:54 MSK
Хм, я когда арч ставил то боялся угрохать все другие записи в ефи разделе и создал отдельный, туда и поставил граб, все работало, однако сейчас поставил граб в ефи и нифига
- Показать ответ
- Ссылка
Ответ на:
комментарий
от PURGEN143 13.01.21 17:46:42 MSK
sudo mount /dev/sda5 /mnt Chroot /mnt Sudo mount /dev/sda1 /mnt/efi
Это совсем плохо.
Toxo2 ★★☆
(13.01.21 18:54:33 MSK)
- Ссылка
Ответ на:
комментарий
от PURGEN143 13.01.21 18:49:52 MSK
Если boot отдельным разделом то и его монтировать надо.
Смотри русскую вики арча груб, там очень хорошо расписан порядок и действия
anonymous
(13.01.21 18:54:49 MSK)
- Ссылка
Ответ на:
комментарий
от PURGEN143 13.01.21 18:48:25 MSK
Ответ на:
комментарий
от d09 13.01.21 19:27:28 MSK
Всё не так просто, я думаю ПУРГЕН наш не осилит. systemd-boot умеет грузить ядра только с того раздела, куда он сам установлен. То есть если он будет ставить его, ему надо будет писать хук пакмана, чтобы ядра перекидывались в его esp при обновлении или сделать /boot своим esp. Ещё bootloader entry надо написать, что легко, но пусть лучше осилит разделы примонтировать нормально и сгенерирует наконец grub.cfg, оно ему так проще будет.
cica
(13.01.21 19:46:47 MSK)
- Показать ответ
- Ссылка
Ответ на:
комментарий
от PURGEN143 13.01.21 17:46:42 MSK
Я же сказал: снчала смонтируй всё нормально.
mount /dev/sda5 /mnt Здесь корень должен быть, если на sda5
mount /dev/sda2 /mnt/boot
mount /dev/sda1 /mnt/boot/EFI
arch-chroot /mnt
потом ставь
fehhner ★★★★★
(13.01.21 20:07:01 MSK)
- Ссылка
Ответ на:
комментарий
от dimuska139 13.01.21 20:47:47 MSK
Зачем? Если нефиг делать есть много других полезных и интересных занятий
anonymous
(13.01.21 21:11:58 MSK)
- Показать ответ
- Ссылка
Ответ на:
комментарий
от anonymous 13.01.21 21:11:58 MSK
В том и суть, что переставить Linux куда быстрее, чем в этом ковыряться. И освободится время на «много других полезных и интересных занятий».
- Показать ответ
- Ссылка
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.
Всем привет. не могу поставить grub выходит ошибка
Installing for i386-pc platform
grub-install: error: failed to get canonical path of » /cow».
Как только запускаю команду
grub-install /dev/sda то сразу выходит эта ошибка…
Installing for i386-pc platform
grub-install: error: failed to get canonical path of » /cow».
что можно сделать?
На автомате ставится без проблем, а если делаю ручную разметку то не ставится. В чем может быть дело?
использую вот этот мануал https://losst.ru/ustanovka-zagruzchika-grub#commen…
-
Вопрос заданболее трёх лет назад
-
26560 просмотров
Пригласить эксперта
Решил проблему с установкой на gpt , оказалось все очень просто для раздела загрузчика не хватало флага legacy_boot . Должно на разделе загрузчика стоять 2 флага bios_grub и legacy_boot
делал вот по этой инструкции https://losst.ru/ustanovka-zagruzchika-grub#commen… раздел «УСТАНОВКА ЗАГРУЗЧИКА GRUB В GPT ДЛЯ BIOS»
С консоли вот такую команду не запускал sudo grub-install /dev/sda
а просто как только разметил диски через gparted и поставил флаги, создал LVM тома для root home и swap . Запустил установщик стандартный указал для чего какой раздел, для своего grub раздела указал что-то типа «резервный загрузочный раздел Bios» и нажал установка и все встало без проблем.
-
Показать ещё
Загружается…
09 февр. 2023, в 22:06
500 руб./за проект
09 февр. 2023, в 22:01
50000 руб./за проект
09 февр. 2023, в 22:00
1 руб./за проект
Минуточку внимания
View previous topic :: View next topic | |||||||||||||||||||||||||||||
Author | Message | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mv Watchman Joined: 20 Apr 2005 |
|
||||||||||||||||||||||||||||
Back to top |
|
||||||||||||||||||||||||||||
324874 Apprentice Joined: 26 Jul 2014 |
|
||||||||||||||||||||||||||||
Back to top |
|
||||||||||||||||||||||||||||
mv Watchman Joined: 20 Apr 2005 |
|
||||||||||||||||||||||||||||
Back to top |
|
||||||||||||||||||||||||||||
324874 Apprentice Joined: 26 Jul 2014 |
|
||||||||||||||||||||||||||||
Back to top |
|
||||||||||||||||||||||||||||
mv Watchman Joined: 20 Apr 2005 |
|
||||||||||||||||||||||||||||
Back to top |
|
||||||||||||||||||||||||||||
324874 Apprentice Joined: 26 Jul 2014 |
|
||||||||||||||||||||||||||||
Back to top |
|
||||||||||||||||||||||||||||
mv Watchman Joined: 20 Apr 2005 |
|
||||||||||||||||||||||||||||
Back to top |
|
||||||||||||||||||||||||||||
324874 Apprentice Joined: 26 Jul 2014 |
|
||||||||||||||||||||||||||||
Back to top |
|
||||||||||||||||||||||||||||
324874 Apprentice Joined: 26 Jul 2014 |
|
||||||||||||||||||||||||||||
Back to top |
|
||||||||||||||||||||||||||||
mv Watchman Joined: 20 Apr 2005 |
|
||||||||||||||||||||||||||||
Back to top |
|
||||||||||||||||||||||||||||
Roman_Gruber Advocate Joined: 03 Oct 2006 |
|
||||||||||||||||||||||||||||
Back to top |
|
||||||||||||||||||||||||||||
324874 Apprentice Joined: 26 Jul 2014 |
|
||||||||||||||||||||||||||||
Back to top |
|
||||||||||||||||||||||||||||
mv Watchman Joined: 20 Apr 2005 |
|
||||||||||||||||||||||||||||
Back to top |
|
||||||||||||||||||||||||||||
kurisu Apprentice Joined: 19 Jan 2011 |
|
||||||||||||||||||||||||||||
Back to top |
|
||||||||||||||||||||||||||||
axl Veteran Joined: 11 Oct 2002 |
|
||||||||||||||||||||||||||||
Back to top |
|
||||||||||||||||||||||||||||
324874 Apprentice Joined: 26 Jul 2014 |
|
||||||||||||||||||||||||||||
Back to top |
|
||||||||||||||||||||||||||||
324874 Apprentice Joined: 26 Jul 2014 |
|
||||||||||||||||||||||||||||
Back to top |
|
||||||||||||||||||||||||||||
mv Watchman Joined: 20 Apr 2005 |
|
||||||||||||||||||||||||||||
Back to top |
|
||||||||||||||||||||||||||||
axl Veteran Joined: 11 Oct 2002 |
|
||||||||||||||||||||||||||||
Back to top |
|
||||||||||||||||||||||||||||
|
You cannot post new topics in this forum |
Forum rules
Before you post please read how to get help. Topics in this forum are automatically closed 6 months after creation.
-
Reljoy
- Level 4
- Posts: 300
- Joined: Sat Mar 13, 2010 12:12 am
[SOLVED] Windows install broke grub
Installed win xp
Dual boot installed Mint 17.1 Mate 64bit
Installed win 8 to upgrade the windows XP partition
Lost my grub boot menu.
Now when I try to
sudo grub-install /dev/sda
I get
Grub-probe: error: failed to get canonical path of ‘/cow’.
Installing for i386-pc platform.
Grub-install.real: error: failed to get canonical path of ‘/cow’.
If i try
Sudo mount /dev/sda2 /mnt/boot
It says
Mount: mount point /mnt/boot does not exist
I have been looking at and trying things from
https://help.ubuntu.com/community/Grub2 … ken_System
Code: Select all
mint@mint ~ $ sudo fdisk -l
Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00011056
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1024002047 512000000 7 HPFS/NTFS/exFAT
/dev/sda2 1024002048 1025025485 511719 83 Linux
/dev/sda3 1025028094 3907028991 1441000449 5 Extended
Partition 3 does not start on physical sector boundary.
/dev/sda5 1025028096 1034790911 4881408 82 Linux swap / Solaris
/dev/sda6 1034792960 1151987711 58597376 83 Linux
/dev/sda7 1151989760 3907028991 1377519616 83 Linux
Code: Select all
mint@mint ~ $ sudo blkid
/dev/loop0: TYPE="squashfs"
/dev/sr0: LABEL="Linux Mint 17.1 MATE 64-bit" TYPE="iso9660"
/dev/sda1: UUID="B694CBEC94CBAD65" TYPE="ntfs"
/dev/sda2: UUID="d250d8b4-82c9-4b40-9fd1-40fb4ecf547a" TYPE="ext2"
/dev/sda5: UUID="e56b41bd-3849-442b-8f6e-052f6ad308e3" TYPE="swap"
/dev/sda6: UUID="29a46605-59c0-4845-b9cd-a22d5bfeb672" TYPE="ext4"
/dev/sda7: UUID="ffd02ebf-6297-473e-a65f-f77bcb318bde" TYPE="ext4"
I have booted from the live DVD to try to fix it and to post this request for help.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
-
Pierre
- Level 21
- Posts: 12788
- Joined: Fri Sep 05, 2008 5:33 am
- Location: Perth, AU.
Re: Windows install broke grub
Post
by Pierre » Sun May 31, 2015 9:41 am
the Windows O/S typically overwrites the MBR and any boot_menu.
so — you have to boot the Mint live_disk / stick,
& you will then have to re-install the LinuxMint boot_loader AKA : GRUB_LOADER.
http://community.linuxmint.com/tutorial/view/245
& so you will have to use the live_disk to do that.
Please edit your original post title to include [SOLVED] — when your problem is solved!
and DO LOOK at those Unanswered Topics — — you may be able to answer some!.
-
Reljoy
- Level 4
- Posts: 300
- Joined: Sat Mar 13, 2010 12:12 am
Re: Windows install broke grub
Post
by Reljoy » Mon Jun 01, 2015 4:33 am
Thanks for the reply. Unfortunately I cannot get it to work.
I went to the link you gave Pierre, and steps 1 and 2 were fine:
Now we need to mount the Linux Mint partition so that we are able to use it (access it) . To do this copy and paste this code into the terminal sudo mount /dev/sdXY /mnt
Code: Select all
mint@mint ~ $ sudo mount /dev/sda6 /mnt
mint@mint ~ $ sudo mount /dev/sda2 /mnt
Note: sda2 is /boot
sda6 is /
But I got confused on step 3 which says:
sudo grub-install —root-directory=/mnt/ /dev/sdX
Code: Select all
mint@mint ~ $ sudo grub-install --root-directory=/mnt/ /dev/sda
grub-probe: error: failed to get canonical path of `/cow'.
Installing for i386-pc platform.
Installation finished. No error reported.
I do not know what that means but it doesn’t look right to me.
You should then see a message saying Grub installer finished or something like that.
Code: Select all
mint@mint ~ $ sudo grub-install --root-directory=/mnt/ /dev/sda
grub-probe: error: failed to get canonical path of `/cow'.
Installing for i386-pc platform.
Installation finished. No error reported.
Well it did say «Installation finished. No error reported.»
So now I will reboot and see if it works.
-
Pjotr
- Level 23
- Posts: 18550
- Joined: Mon Mar 07, 2011 10:18 am
- Location: The Netherlands (Holland) 🇳🇱
- Contact:
Re: Windows install broke grub
Post
by Pjotr » Mon Jun 01, 2015 4:44 am
Reljoy wrote:grub-probe: error: failed to get canonical path of `/cow’.
That particular error is harmless. You should be fine now.
-
Reljoy
- Level 4
- Posts: 300
- Joined: Sat Mar 13, 2010 12:12 am
Re: Windows install broke grub
Post
by Reljoy » Mon Jun 01, 2015 4:51 am
Well, I managed to stop it booting straight into windows.
Now it stops in grub. There is a heading :
GNU GRUB version 2.02~beta2-9ubuntu1
and a couple of sentences about Minimal BASH-like line editing being supported.
Then it has on the left hand side
So I tried:
Code: Select all
mint@mint ~ $ sudo mount /dev/sda2 /mnt
mint@mint ~ $ sudo grub-install --root-directory=/mnt/ /dev/sda
grub-probe: error: failed to get canonical path of `/cow'.
Installing for i386-pc platform.
Installation finished. No error reported.
mint@mint ~ $ sudo update-grub
/usr/sbin/grub-probe: error: failed to get canonical path of `/cow'.
But it didn’t work.
I do not know what to do now.
-
Pjotr
- Level 23
- Posts: 18550
- Joined: Mon Mar 07, 2011 10:18 am
- Location: The Netherlands (Holland) 🇳🇱
- Contact:
Re: Windows install broke grub
Post
by Pjotr » Mon Jun 01, 2015 5:01 am
You’ve got Grub back in the MBR (it replaced NTLoader from Windows), but apparently it doesn’t point to your Linux root partition yet. Edit: I see that you’ve apparently separated /boot (sda2) from root (sda6). Why this complication?
Oh, and by the way: you shouldn’t run «sudo update-grub» afterwards. That you should only do when back in your successfully booted Linux (in order to make it recognize the new Windows).
-
Reljoy
- Level 4
- Posts: 300
- Joined: Sat Mar 13, 2010 12:12 am
Re: Windows install broke grub
Post
by Reljoy » Mon Jun 01, 2015 6:09 am
This looks helpful. I will reboot and try it. By putting the link here I will not lose it when I reboot with the live DVD.
http://askubuntu.com/questions/207663/c … n-live-usb
I separate /boot from / as it was recommended in a tutorial about partitioning and installing Linux Mint. I also have a separate /home
Code: Select all
mint@mint /mnt $ blkid
/dev/loop0: TYPE="squashfs"
/dev/sda1: UUID="B694CBEC94CBAD65" TYPE="ntfs"
/dev/sda2: UUID="d250d8b4-82c9-4b40-9fd1-40fb4ecf547a" TYPE="ext2"
/dev/sda5: UUID="e56b41bd-3849-442b-8f6e-052f6ad308e3" TYPE="swap"
/dev/sda6: UUID="29a46605-59c0-4845-b9cd-a22d5bfeb672" TYPE="ext4"
/dev/sda7: UUID="ffd02ebf-6297-473e-a65f-f77bcb318bde" TYPE="ext4" LABEL="Home"
/dev/sr0: LABEL="Linux Mint 17.1 MATE 64-bit" TYPE="iso9660"
sda2 is /boot
sda6 is /
sda7 is /home
-
Pjotr
- Level 23
- Posts: 18550
- Joined: Mon Mar 07, 2011 10:18 am
- Location: The Netherlands (Holland) 🇳🇱
- Contact:
Re: Windows install broke grub
Post
by Pjotr » Mon Jun 01, 2015 6:14 am
Reljoy wrote:I separate /boot from / as it was recommended in a tutorial about partitioning and installing Linux Mint. I also have a separate /home
A separate /home is no problem in this case (although I don’t find that very useful, so I don’t have one myself). But the separate /boot is at best a needless complication, which might well be an extra problem in this case.
-
Reljoy
- Level 4
- Posts: 300
- Joined: Sat Mar 13, 2010 12:12 am
Re: Windows install broke grub
Post
by Reljoy » Mon Jun 01, 2015 6:23 am
mint@mint ~ $ sudo mount /dev/sda6 /mnt
mint@mint ~ $ sudo mount /dev/sda2 /mnt/boot
So far so good.
sudo grub-install —root-directory=/mnt /dev/sda
Code: Select all
mint@mint ~ $ sudo grub-install --root-directory=/mnt /dev/sda
grub-probe: error: failed to get canonical path of `/cow'.
Installing for i386-pc platform.
Installation finished. No error reported.
That doesn’t look good. Looks like something didn’t work.
Code: Select all
mint@mint ~ $ df
Filesystem 1K-blocks Used Available Use% Mounted on
/cow 1764912 78708 1686204 5% /
udev 1720464 12 1720452 1% /dev
tmpfs 352984 1360 351624 1% /run
/dev/sr0 1594656 1594656 0 100% /cdrom
/dev/loop0 1554816 1554816 0 100% /rofs
none 4 0 4 0% /sys/fs/cgroup
tmpfs 1764912 4 1764908 1% /tmp
none 5120 0 5120 0% /run/lock
none 1764912 76 1764836 1% /run/shm
none 102400 36 102364 1% /run/user
/dev/sda6 57546748 5229748 49370748 10% /mnt
/dev/sda2 495560 6781 463195 2% /mnt/boot
-
Pjotr
- Level 23
- Posts: 18550
- Joined: Mon Mar 07, 2011 10:18 am
- Location: The Netherlands (Holland) 🇳🇱
- Contact:
Re: Windows install broke grub
Post
by Pjotr » Mon Jun 01, 2015 6:25 am
Reljoy wrote:mint@mint ~ $ sudo mount /dev/sda6 /mnt
mint@mint ~ $ sudo mount /dev/sda2 /mnt/boot
So far so good.sudo grub-install —root-directory=/mnt /dev/sda
Code: Select all
mint@mint ~ $ sudo grub-install --root-directory=/mnt /dev/sda grub-probe: error: failed to get canonical path of `/cow'. Installing for i386-pc platform. Installation finished. No error reported.
That doesn’t look good. Looks like something didn’t work.
That *does* look good! As I said before: the «cow» error is harmless.
I advise to try a normal boot now.
-
Pjotr
- Level 23
- Posts: 18550
- Joined: Mon Mar 07, 2011 10:18 am
- Location: The Netherlands (Holland) 🇳🇱
- Contact:
Re: Windows install broke grub
Post
by Pjotr » Mon Jun 01, 2015 6:39 am
Well, in this case I’d consider the «nuclear option»: do a clean re-install of Linux Mint 17.1. In this case you have a separate /home anyway, so that should save you some time and trouble.
When you do this: do *not* create a separate /boot again. It’s an unnecessary complication.
-
Laurent85
- Level 17
- Posts: 7015
- Joined: Tue May 26, 2015 10:11 am
Re: Windows install broke grub
Post
by Laurent85 » Mon Jun 01, 2015 6:41 am
Reljoy wrote:
Code: Select all
mint@mint ~ $ sudo update-grub /usr/sbin/grub-probe: error: failed to get canonical path of `/cow'.
But it didn’t work.
I do not know what to do now.
You need to chroot before updating grub menu list. Try :
Code: Select all
$ sudo mount /dev/sda6 /mnt
$ sudo mount /dev/sda2 /mnt/boot
$ sudo mount -o bind /dev /mnt/dev
$ sudo -s
# chroot /mnt
# mount -t proc proc /proc && mount -t sysfs sysfs /sys && mount -t devpts devpts /dev/pts
# grub-install /dev/sda
# update-grub
# umount /dev/pts /sys /proc
# exit
another exit
# exit
$ sudo umount /mnt/dev /mnt/boot /mnt
Then reboot.
-
Reljoy
- Level 4
- Posts: 300
- Joined: Sat Mar 13, 2010 12:12 am
Re: Windows install broke grub
Post
by Reljoy » Mon Jun 01, 2015 6:47 am
That looks a lot better!
Code: Select all
mint@mint ~ $ sudo mount /dev/sda6 /mnt
mint@mint ~ $ sudo mount /dev/sda2 /mnt/boot
mint@mint ~ $ sudo mount -o bind /dev /mnt/dev
mint@mint ~ $ sudo -s
mint ~ # chroot /mnt
mint / # mount -t proc proc /proc && mount -t sysfs sysfs /sys && mount -t devpts devpts /dev/pts
mint / # grub-install /dev/sda
Installing for i386-pc platform.
Installation finished. No error reported.
mint / # update-grub
Generating grub configuration file ...
No volume groups found
Found Windows 8 (loader) on /dev/sda1
done
mint / # umount /dev/pts /sys /proc
mint / # exit
exit
mint ~ # exit
exit
mint@mint ~ $ sudo umount /mnt/dev /mnt/boot /mnt
mint@mint ~ $
What does this line do?
And what does this line do?
Code: Select all
mount -t proc proc /proc && mount -t sysfs sysfs /sys && mount -t devpts devpts /dev/pts
About to reboot now.
-
Reljoy
- Level 4
- Posts: 300
- Joined: Sat Mar 13, 2010 12:12 am
Re: Windows install broke grub
Post
by Reljoy » Mon Jun 01, 2015 6:54 am
Grub menu has Windows 8 in it.
I can boot into Windows 8.
But there is no entry for Linux Mint in the Grub menu.
-
Laurent85
- Level 17
- Posts: 7015
- Joined: Tue May 26, 2015 10:11 am
Re: Windows install broke grub
Post
by Laurent85 » Mon Jun 01, 2015 7:00 am
Reljoy wrote:
Code: Select all
mint / # update-grub Generating grub configuration file ... No volume groups found Found Windows 8 (loader) on /dev/sda1 done
Humm no kernel image reported by update-grub. Grub could not find any kernel image installed. Please check :
Code: Select all
$ sudo mount /dev/sda2 /mnt
$ sudo ls /mnt
$ sudo umount /mnt
$ sudo mount /dev/sda6 /mnt
$ sudo ls /mnt/boot
$ sudo umount /mnt
Please report command output.
-
Reljoy
- Level 4
- Posts: 300
- Joined: Sat Mar 13, 2010 12:12 am
Re: Windows install broke grub
Post
by Reljoy » Mon Jun 01, 2015 7:06 am
Code: Select all
mint@mint ~ $ sudo mount /dev/sda2 /mnt
mint@mint ~ $ sudo ls /mnt
boot grub lost+found
mint@mint ~ $ sudo umount /mnt
mint@mint ~ $ sudo mount /dev/sda6 /mnt
mint@mint ~ $ sudo ls /mnt/boot
grub
mint@mint ~ $ sudo umount /mnt
mint@mint ~ $
-
Reljoy
- Level 4
- Posts: 300
- Joined: Sat Mar 13, 2010 12:12 am
Re: Windows install broke grub
Post
by Reljoy » Mon Jun 01, 2015 7:15 am
Code: Select all
mint@mint ~ $ sudo mount /dev/sda2 /mnt
mint@mint ~ $ sudo ls /mnt
boot grub lost+found
mint@mint ~ $ sudo umount /mnt
mint@mint ~ $ sudo mount /dev/sda6 /mnt
mint@mint ~ $ sudo ls /mnt/boot
grub
mint@mint ~ $ sudo umount /mnt
mint@mint ~ $ sudo mount /dev/sda2 /mnt
mint@mint ~ $ sudo ls /mnt/boot
grub
mint@mint ~ $ sudo umount /mnt
mint@mint ~ $ sudo mount /dev/sda6 /mnt
mint@mint ~ $ sudo cat /mnt/etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda6 during installation
UUID=29a46605-59c0-4845-b9cd-a22d5bfeb672 / ext4 errors=remount-ro 0 1
# /boot was on /dev/sda2 during installation
UUID=2efbf722-5cd4-4f18-a1cb-dbfa18e403d0 /boot ext2 defaults 0 2
# /home was on /dev/sda7 during installation
UUID=ffd02ebf-6297-473e-a65f-f77bcb318bde /home ext4 defaults 0 2
# swap was on /dev/sda5 during installation
UUID=e56b41bd-3849-442b-8f6e-052f6ad308e3 none swap sw 0 0
mint@mint ~ $ sudo umount /mnt
mint@mint ~ $
-
Laurent85
- Level 17
- Posts: 7015
- Joined: Tue May 26, 2015 10:11 am
Re: Windows install broke grub
Post
by Laurent85 » Mon Jun 01, 2015 7:21 am
So your boot directory has no kernel image installed. Type this commands to fix :
Code: Select all
$ sudo mount /dev/sda6 /mnt
$ sudo mount /dev/sda2 /mnt/boot
$ sudo mount -o bind /dev /mnt/dev
$ sudo -s
# chroot /mnt
# mount -t proc proc /proc && mount -t sysfs sysfs /sys && mount -t devpts devpts /dev/pts
Cleaning boot
# rm -r /boot/*
# grub-install /dev/sda
# apt-get --reinstall install linux-kernel-generic linux-headers-3.13.0-37 linux-headers-3.13.0-37-generic linux-image-3.13.0-37-generic linux-image-extra-3.13.0-37-generic
Reinstall shoud update initramfs & grub but to be sure :
# update-initramfs -u
# update-grub
Grub should report kernel image found
# umount /dev/pts /sys /proc
# exit
another exit
# exit
$ sudo umount /mnt/dev /mnt/boot /mnt
Reboot.
For what it’s worth, I get a similar behavior on Debian Jessie (installed roughly according to the guide, but with LUKS encrypted root) if I use the grub-pc
package from jessie-backports (2017-03-28) but it works if I use the version from Debian testing instead.
I thought at first that I wouldn’t need the newer grub version from testing
because I was going to use /boot
on ext4, but I found out the grub package is involved in figuring out the root=ZFS= kernel parameter. So I needed the testing version anyways.
The versions were like this:
# Before upgrade (does not work)
root@debnastest:/etc/grub.d# /.zfs/snapshot/seems-to-work-now/usr/sbin/grub-probe --version
/.zfs/snapshot/seems-to-work-now/usr/sbin/grub-probe (GRUB) 2.02~beta2-22+deb8u1
# After upgrade (works)
root@debnastest:~# grub-probe --version
grub-probe (GRUB) 2.02~beta3-5
root@debnastest:/etc/grub.d# apt-cache policy grub-pc
grub-pc:
Installed: 2.02~beta3-5
Candidate: 2.02~beta3-5
Version table:
*** 2.02~beta3-5 0
600 http://ftp.debian.org/debian/ testing/main amd64 Packages
100 /var/lib/dpkg/status
2.02~beta2-22+deb8u1 0
700 http://ftp.us.debian.org/debian/ jessie/main amd64 Packages
700 http://security.debian.org/ jessie/updates/main amd64 Packages
With grub-pc from jessie-backports grub-probe is broken:
root@debnastest:~# zpool status
pool: rpool
state: ONLINE
scan: resilvered 996K in 0h0m with 0 errors on Sat Mar 25 12:42:14 2017
config:
NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
crypt-rpool-a ONLINE 0 0 0
crypt-rpool-b ONLINE 0 0 0
errors: No known data errors
root@debnastest:~# grub-probe /boot
ext2
root@debnastest:~# grub-probe /
grub-probe: error: failed to get canonical path of `/dev/crypt-rpool-a'.
root@debnastest:~# ln -s /dev/mapper/crypt-rpool-* /dev/
root@debnastest:~# grub-probe /
grub-probe: error: unknown filesystem.
The first problem is that it looks for the devices in the wrong place. Symlinking them causes another unknown filesystem
error in this version of grub from jessie-backports
.
After upgrading to grub-pc from Debian testing
it works even without the symlinks:
root@debnastest:~# zpool status
pool: rpool
state: ONLINE
scan: resilvered 996K in 0h0m with 0 errors on Sat Mar 25 12:42:14 2017
config:
NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
crypt-rpool-a ONLINE 0 0 0
crypt-rpool-b ONLINE 0 0 0
errors: No known data errors
root@debnastest:~# grub-probe --version
grub-probe (GRUB) 2.02~beta3-5
root@debnastest:~# grub-probe /
zfs
root@debnastest:~# ls -l /dev/crypt*
ls: cannot access /dev/crypt*: No such file or directory
The command used by /etc/grub.d/10_linux to find out the pool name for the root also started working when upgrading to grub from testing
:
root@debnastest:/etc/grub.d# grub-probe --device /dev/mapper/crypt-rpool-a --target=fs_label
rpool
-edit-: here is what the partitioning looks like:
root@debnastest:~# gdisk -l /dev/sda
GPT fdisk (gdisk) version 0.8.10
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 31457280 sectors, 15.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): C9A4B367-0338-4234-AF67-0A75E82ABF5C
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 31457246
Partitions will be aligned on 2-sector boundaries
Total free space is 0 sectors (0 bytes)
Number Start (sector) End (sector) Size Code Name
1 1667072 31440861 14.2 GiB BF01 rpool-b
2 34 4095 2.0 MiB EF02 bios-boot
3 4096 618495 300.0 MiB EF00 efi-boot
4 618496 1667071 512.0 MiB FD00 boot-b
9 31440862 31457246 8.0 MiB 8301 Linux reserved
root@debnastest:~# gdisk -l /dev/sdb
GPT fdisk (gdisk) version 0.8.10
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sdb: 31457280 sectors, 15.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): F6113851-6D14-4C39-AE43-D14B2B36DD13
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 31457246
Partitions will be aligned on 2-sector boundaries
Total free space is 0 sectors (0 bytes)
Number Start (sector) End (sector) Size Code Name
1 1667072 31440861 14.2 GiB BF01 rpool-a
2 34 4095 2.0 MiB EF02 bios-boot
3 4096 618495 300.0 MiB EF00 efi-boot
4 618496 1667071 512.0 MiB FD00 boot-a
9 31440862 31457246 8.0 MiB 8301 Linux reserved
I boot using the BIOS method with GPT partitioning, but have prepared the efi partitions for future use (unformatted). I’m testing this in VirtualBox as a candidate for a home server install. /boot is on ext4 on mdadm RAID1 on the boot-{a,b} partitions.
mdadm and cryptsetup:
root@debnastest:~# cat /etc/crypttab
# <target name> <source device> <key file> <options>
crypt-rpool-a /dev/disk/by-partlabel/rpool-a none luks,initramfs
crypt-rpool-b /dev/disk/by-partlabel/rpool-b none luks,initramfs
root@debnastest:~# cat /etc/mdadm/mdadm.conf
# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#
# by default (built-in), scan all partitions (/proc/partitions) and all
# containers for MD superblocks. alternatively, specify devices to scan, using
# wildcards if desired.
#DEVICE partitions containers
# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes
# automatically tag new arrays as belonging to the local system
HOMEHOST <system>
# instruct the monitoring daemon where to send mail alerts
MAILADDR root
# definitions of existing MD arrays
ARRAY /dev/md/0 metadata=1.2 UUID=985a044f:1e43f780:7df469cf:48b6eca2 name=debian:0
# This configuration was auto-generated on Thu, 23 Mar 2017 19:18:37 +0100 by mkconf
fstab:
root@debnastest:~# cat /etc/fstab
rpool/ROOT/debian / zfs defaults 0 1
/dev/md/0 /boot ext4 defaults 0 2