On 12/11/2020 04:50 PM, Michael wrote:
> On Friday, 11 December 2020 22:29:12 GMT the...@sys-concept.com wrote:
>> On 12/11/2020 03:06 PM, Jack wrote:
>>> On 12/11/20 4:36 PM, the...@sys-concept.com wrote:
>>>> I wipe the /boot, reinstall kernel, initframes, grub.
>>>> The system boots, I can login as root but X is not running,
>>>> the command is displaying:  "(none) /#"
>>>>
>>>> When I try to start the network I get:
>>>> fsck.fat 4.1 (2017-01-24) open: no such file or directory
>>>> Filesystems couldn't be fixed
>>>> ERROR: fsck failed to start
[snip]
>>>
>>> Are you sure that fsck message has anything to do with starting the
>>> network?  It looks like fsck can't find the open command, so there may
>>> be something more wrong than just a read-only /.
>>
>> I'm using now linux-5.4.72-gentoo, grub only. Install boot loader from
>> scratch.
>> I only use genkernel to install initframes:
>>
>> genkernel --install --kernel-config=/usr/src/linux/.config initramfs
>>
>> No, errors during startup in dmesg.  So I have very little to go by.
>> Trying  "touch 1.txt"
>> Read-only file system.
>>
>> I'm using slim, but I can deal with X later on.
>> Something happen to this system and I can not fix it, it is a brand new
>> installation, but not reliable :-/
> 
> When you "wiped /boot" did you reformat the partition?  If yes, did you 
> recreate a filesystem label with the same name as used in your /etc/fstab?

No, I did not reformat the /boot partition. I just cd to /boot and run:
rm -r *

> Is this a brand new kernel image + initramfs, or a kernel image which you 
> have 
> used at least once before to boot this machine successfully?

Yes, this machine is new but I run it for a over 10-days, configured
most of the programs and it was running without much problems.
Yesterday, I decided to check some parameters in kernel .config so I run:
 genkernel --menuconfig all

* Gentoo Linux Genkernel; Version 4.1.2
* Using genkernel configuration from '/etc/genkernel.conf' ...
* Running with options: --kernel-config=/proc/config.gz all

* Working with Linux kernel 5.4.72-gentoo-x86_64 for x86_64
* Using kernel config file '/proc/config.gz' ...
*
* Note: The version above is subject to change (depends on config and
status of kernel sources).

* kernel: >> Initializing ...
*         >> Running 'make clean' ...
*         >> --mrproper is set; Making 'make mrproper' ...
*         >> Will ignore kernel config from '/proc/config.gz'
*            in favor of already existing but different kernel config
*            found in '/usr/src/linux/.config' ...
*         >> Running 'make oldconfig' ...
*         >> Compiling 5.4.72-gentoo-x86_64 bzImage ...


When I exit it it started to compile the kernel (it did not finish) I
pressed
"CTRL-C" (interrupted).
I didn't know then, but running genkernel --menuconfig all
takes configuration from:
/etc/kernels/kernel-config-5.4.72-gentoo-x86_64

not from: /usr/src/linux/.config

However, NO FILE HAD CHANGED IN /boot
But this this is the moment, I couldn't boot correctly.

So after several tries I wipe the /boot, I downloaded standard kernel
linux-5.4.72-gentoo run as usual:
make && make modules_install
make install
genkernel --install --kernel-config=/usr/src/linux/.config initramfs
grub-install --target=x86_64-efi --efi-directory=/boot
grub-mkconfig -o /boot/grub/grub.cfg

But nothing had changed. So I tired newer kernel: 5.4.80-gentoo-r1-x86_64
But this time I run (without interruptions):
 genkernel --menuconfig all
grub-mkconfig -o /boot/grub/grub.cfg

And again nothing changed, root "/" still mounts "ro"

findmnt
TARGET                        SOURCE         FSTYPE   OPTIONS
/                             /dev/nvme0n1p4 ext4     ro,relatime

Normally it should be:
findmnt
TARGET                       SOURCE      FSTYPE      OPTIONS
/                            /dev/sda4   ext4        rw,noatime,data=ordered

> Does dmesg show the drive being recognised, corresponding drivers being 
> loaded, partitions and filesystems recognised?

cat dmesg  |grep error
doesn't show any errors

> Does syslog show any relevant errors?

Kernel log, nor error entry either.

> Does 'mount' or 'findmnt' show all your partitions?

Yes, they are all "rw" except the "/" partition  /dev/nvme0n1p4

> Are they mounted as rw?
> 
> These are just some steps you could follow to find out at what stage a 
> problem 
> may have occurred and what to check/fix to get it booting successfully.
> 
> PS.  These days there are precompiled kernels + initramfs available to get a 
> system booting quickly, like sys-kernel/gentoo-kernel-bin, before you finesse 
> a slimmer kernel manually later on - should you ever wish to roll your own by 
> hand.

I'll try to boot GParted and see what comes up.


Reply via email to