[arch-general] how to restore root and boot directory

niya levi niyalevi at gmail.com
Sun Sep 25 10:13:29 UTC 2016


> Message: 1
> Date: Fri, 23 Sep 2016 18:32:07 +0100
> From: niya levi <niyalevi at gmail.com>
> To: arch-general at archlinux.org
> Subject: [arch-general] how to restore root and boot directory
> Message-ID: <198a7e51-313b-6e03-ada4-b0727c6afe86 at gmail.com>
> Content-Type: text/plain; charset=utf-8
>
> Hi everyone
> while reinstalling arch on raspberry pi memory stick i had the two
> partitions mounted on mount points called root and boot  in my home dir
> on my laptop,
> i intended to delete everything in root and boot in my home directory
> but lost my mind and rm -rf /boot/* and /root/* instead,
> is there a easy way to restore files to boot and do i just fix the root
> user directory with useradd ?
> shadrock
>
>
> ------------------------------
>
> Message: 2
> Date: Fri, 23 Sep 2016 19:46:03 +0200
> From: Damjan Georgievski <gdamjan at gmail.com>
> To: General Discussion about Arch Linux <arch-general at archlinux.org>
> Subject: Re: [arch-general] how to restore root and boot directory
> Message-ID:
> 	<CAEk1YH7_MGxD-eWR0dm+xo=nT9DU4jT4Ng0tKnwd_mxdsyHi7w at mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> /root really shouldn't have anything of importance, unless you left it
> there - in which case, you can't recover it
>
> /boot has the kernel, the initramfs - which can be recreated if you
> reinstall the "linux" package
>
> and probably some bootloader files that you can also reinstall
> depending on the boot loader:
> - grub-install
> - extlinux
> - bootctl
>
> -- damjan ------------------------------ Message: 3 Date: Fri, 23 Sep
> 2016 14:46:46 -0300 From: Fernando <fernando at softwareperonista.com.ar>
> To: General Discussion about Arch Linux <arch-general at archlinux.org>
> Cc: niya levi <niyalevi at gmail.com> Subject: Re: [arch-general] how to
> restore root and boot directory Message-ID:
> <1474652806.1050.0 at smtp.gmail.com> Content-Type: text/plain;
> charset=utf-8; format=flowed El vie, 23 de sep 2016 a las 2:32 , niya
> levi via arch-general <arch-general at archlinux.org> escribi?:
> Hi! First you have to reinstall filesystem package.
>
> To list the packages that contains files in /boot use. You have to 
> reinstall those packages.
>
> pacman -Ql | grep " /boot/"
>
> and then configure your bootloader.
>
> Fernando Fernandez
> Software Peronista
>> ------------------------------
>>
>> Message: 6
> Date: Fri, 23 Sep 2016 22:55:53 +0200
> From: J?r?me M. Berger <jeberger at free.fr>
> To: arch-general at archlinux.org
> Subject: Re: [arch-general] how to restore root and boot directory
> Message-ID: <ns44sr$tu5$1 at blaine.gmane.org>
> Content-Type: text/plain; charset="utf-8"
>
> On 09/23/2016 07:46 PM, Fernando wrote:
>> To list the packages that contains files in /boot use. You have to 
>> reinstall those packages.
>>
>> pacman -Ql | grep " /boot/"
>>
> 	Or pacman -Qo /boot, which gives me:
>
> /boot/ is owned by filesystem 2015.09-1
> /boot/ is owned by intel-ucode 20160714-1
> /boot/ is owned by linux 4.7.4-1
> /boot/ is owned by linux-lts 4.4.21-1
> /boot/ is owned by syslinux 6.03-6
>
> 	So you need to reinstall at least "filesystem" and "linux" plus
> whatever booloader you're using. Reinstalling "linux" should run
> mkinitcpio automatically but your bootloader will need to be reconfigured.
>
> 		Jerome
> -- mailto:jeberger at free.fr http://jeberger.free.fr Jabber:
> jeberger at jabber.fr -------------- next part -------------- A non-text
> attachment was scrubbed... Name: signature.asc Type:
> application/pgp-signature Size: 187 bytes Desc: OpenPGP digital
> signature URL:
> <https://lists.archlinux.org/pipermail/arch-general/attachments/20160923/ed101016/attachment-0001.asc>
> ------------------------------
hi everyone

thanks for all the replies

i did

pacman -Ql | grep " /boot/" which gave me the following

grub /boot/
grub /boot/grub/
grub /boot/grub/grub.cfg
linux /boot/
linux /boot/vmlinuz-linux

so i installed grub and linux

then ran

grub-install /dev/sda

grub-mkconfig -o /boot/grub/grub.cfg

i haven't rebooted yet as i have to backup some stuff and i'm in the
middle of a project i need to complete.

will report back when i reboot the laptop,

again thanks for all the advice.

shadrock


More information about the arch-general mailing list