Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in /etc/mkinitcpio.conf FIXED MANUALLY #2

Closed
niteraleph opened this issue Nov 14, 2017 · 6 comments
Closed

Error in /etc/mkinitcpio.conf FIXED MANUALLY #2

niteraleph opened this issue Nov 14, 2017 · 6 comments

Comments

@niteraleph
Copy link

First of all: I am writing this from a totally RAM loaded Arch, thanks to you 👍 I will provide some feedback elsewhere (positive), but here I will only describe the problem I encountered.

Setup

I have an up-to-date Arch and used git clone <AUR link> to clone ramroot package into ~/builds/
then I obviously ran makepkg and after the script finished I realized it did not put ramroot binary and the lib content in the right directories. I therefore copied cp ~/build/ramroot/usr/bin/* /usr/bin/ and did the same for the lib directory (was too lazy to copy the man pages).

Problem

I ran ramroot enable and encountered an error. While I don't have the error log, and don't feel like messing up again once it works, it essentially said "unexpected EOF" line 67 in /etc/mkinitpio.conf when creating the initramfs. So I checked the file and I found the error (hence, a log file is unneccessary): It turns out, your script added the hooks correctly but did not add the modules correctly. Instead of having: MODULES=(zram ext4) which works for me, your script wrote: MODULES=() zram ext4" (IMPORTANT: notice the qoute sign on the right). I'm not sure why this happened, but I edited it to be the correct version as above (inside the braces). I think there are two alternative syntax' avaible and your script messed them together or something.

Solution

After I edited /etc/mkinitcpio.conf file: MODULES=(zram ext4) I ran sudo mkinitcpio -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
This has finally worked and not threw any errors. I have rebooted and everything was as it should be. I am not sure whether the problem is in your script or in my setup. However, I want to signal it, so if somebody else encounters it it will be fixed/or he can fix it himself.

P.S. I'd like to provide some feedback (not technical problem, but report of what I like in ramroot and how I use it), but not sure where to post it. Issue? Email? Pull Request?

@arcmags
Copy link
Owner

arcmags commented Nov 15, 2017

First of all, thank you for the feedback. It's great to know someone is actually using something I made! Also, I value any criticisms or praise so that I may make due improvements when possible.

So, the setup problem may not actually be a problem. Running makepkg within a clone of the AUR repo simply builds the package (it does not install it). To install a package you need to either execute makepkg -sri or install via pacman -U after you have already built the package. Installing in one of these ways will ensure that all source files are copied to their required locations (also removed when uninstalling via pacman -Rns).

The problem adding items to the MODULES array in /etc/mkinitcpio.conf is strange. It may have something to do with how you installed ramroot, but I don't think that should have mattered. I will be fully investigating this within a few days or on the weekend (have some papers due this week).

Thanks.
P.S. email would be great as well!
c.magyar.ec@gmail.com

@arcmags
Copy link
Owner

arcmags commented Nov 16, 2017

So far I have been unable to duplicate the MODULES array problem. I will keep investigating.

Also, the latest version of ramroot now has a --dryrun option that can be used for testing/debugging issues.

@jeffscode
Copy link

jeffscode commented Nov 28, 2017

I've just recently thought of setting up a system to use initramfs or possibly others to run from ram. Found your project during research.

I'm running the AUR version in a full xfce4 DE in vbox.
Same issue when running ramroot enable: "unexpected EOF"
cause same as above /etc/mkinincpio.conf has : MODULES=() zram ext4"
I also manually edited to correct conf, then ran mkinitcpio -p linux. This built an initramfs w/o errors and boots system. However seems to not be running in ram even though...

$ ramroot status
:: ramroot enabled

Going to do a bit more testing and take a look at the ramroot script.... Very cool project!!

BTW: you aware of recent changes to /etc/mkinitcpio.conf?
Was like this:

#     MODULES="piix ide_disk reiserfs"
MODULES=""
HOOKS="base udev v86d autodetect modconf block filesystems keyboard fsck"

New format:

#     MODULES=(piix ide_disk reiserfs)
MODULES=()
HOOKS=(base udev autodetect modconf block filesystems keyboard fsck)

EDIT:
Added ram to the vm, runs in ram now. I had to manually mount /home partition. Running X ok.

@arcmags
Copy link
Owner

arcmags commented Nov 29, 2017

Thanks for the heads up with the new /etc/mkinitcpio.conf. I'll be updating as soon as possible to fix this issue.

@arcmags
Copy link
Owner

arcmags commented Nov 30, 2017

New version of ramroot now uses the new array variables standard in /etc/mkinitcpio.conf. The AUR package has been updated as well.

@arcmags arcmags closed this as completed Nov 30, 2017
@arcmags
Copy link
Owner

arcmags commented Nov 30, 2017

commit 454c1f2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants