Unable to find root device / sda partitions missing
Solution 1
Apparently the fstab didn't get saved or got cleared. Reconfiguring this file solved all problems.
Solution 2
My guess is that the /boot/grub/grub.cfg
entry for Arch names the device incorrectly. See Persistent block device naming article in the Arch Wiki for really exciting background details.
My Arch server has this line in grub.cfg
:
linux /boot/vmlinuz-linux-lts root=UUID=51167b47-d8b4-41e5-87d5-9c5a7bb6fbc1 ro quiet
Looks like I'm using "by-uuid" naming there. The file /etc/fstab
uses the "/dev/sda?" style names, but it's auto-generated, and comments indicate that /dev/sda1 refers to the same UUID as in grub.cfg
.
To fix this, I'd say redo the GRUB stuff using the Arch Beginner's Guide, except that you have a dual boot setup. Maybe you could generate a grub.cfg
file elsewhere, and see what the "root=" value is:
grub-mkconfig -o /tmp/testgrub.cfg
I ran that and it looked like this:
[root@splunge tmp]# grub-mkconfig -o /tmp/testgrub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux-lts
Found initramfs image: /boot/initramfs-linux-lts.img
Found fallback initramfs image: /boot/initramfs-linux-lts-fallback.img
Found linux image: /boot/vmlinuz-linux-lts
done
Under "menuentry 'Arch Linux'", I found this line in /tmp/testgrub.cfg
:
linux /boot/vmlinuz-linux-lts root=/dev/sda1 rw quiet
That tells me that another way to go might be necessary, since it says "/dev/sda1" instead of the UUID from above. What does /etc/fstab
say right above the "/dev/sda1" entry? If it's a UUID, you might want to edit /boot/grub/grub.cfg
to set the root partition by UUID.
EDIT
Since you say that /boot/vmlinuz-linux
exists, I'd say to re-install GRUB: pacman -S grub
. Something has messed up the shell scripts that comprise grub-mkconfig
, preventing them from making a good grub.cfg
file. Then try the grub-mkconfig
command above to see if it finds a kernel in /boot
. If it does, re-run it for real and see what the "root=" param in the "Arch Linux" menuentry section is.
Related videos on Youtube
DucatiNerd
Updated on September 18, 2022Comments
-
DucatiNerd over 1 year
i have a simple JSON sanitization Filter/RequestWrapper (content type is
application/json
). However, none of the important overrides (getReader(), getInputStream(), getParameter*()
) gets called inside my wrapper.This is my filter:
public class MyFilter implements Filter { public MyFilter() { //Empty } @Override public void init(final FilterConfig filterConfig) throws ServletException { //Empty } @Override public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain) throws IOException, ServletException { HttpServletRequest httpRequest = (HttpServletRequest)request; HttpServletResponse httpResponse = (HttpServletResponse)response; MyRequestWrapper wrappedRequest = new MyRequestWrapper(httpRequest); chain.doFilter(wrappedRequest, httpResponse); } @Override public void destroy() { // TODO Auto-generated method stub } }
and here is my wrapper:
public class MyRequestWrapper extends HttpServletRequestWrapper { private HttpServletRequest servletRequest; public MyRequestWrapper(HttpServletRequest servletRequest) { super(servletRequest); this.servletRequest = servletRequest; } @Override public String[] getParameterValues(String parameter) { String[] values = super.getParameterValues(parameter); if (values == null) { return null; } int count = values.length; String[] sanitizedValues = new String[count]; for (int i = 0; i < count; i++) { sanitizedValues[i] = sanitizeUserInput(values[i]); } return sanitizedValues; } @Override public String getParameter(String parameter) { String value = super.getParameter(parameter); return sanitizeUserInput(value); } @Override public ServletInputStream getInputStream() throws IOException { return this.servletRequest.getInputStream(); } @Override public BufferedReader getReader() throws IOException { return new BufferedReader(new InputStreamReader(this.getInputStream())); } private String sanitizeUserInput(String input) { // ... return input; } }
I have also tried overridng getParameterMap(), getHeaders(), etc. Some of the overrides are called - however not when my json is posted to the servlet. Is it possible that another filter in the filter-chain swallows the post body? Any ideas how i can debug this or does anybody have an idea what can go wrong?
thanks
-
Jeroen about 10 yearsI used that command to generate the grub config, but no menu entries were present by default.
-
Admin about 10 years@JeroenBollen - see edits.
-
Jeroen about 10 yearsThe update will find a memory test image and stop after that. It'll print a warning saying unknown device type 'dm-0'.
-
Admin about 10 years@JeroenBollen - something's really wrong with your Arch installation. Does it have files like "/boot/vmlinuz-linux"? I'm using the "Long Term Support" kernel on my server, so the file is /boot/vmlinuz-linux-lts.
-
Jeroen about 10 yearsI do have that file yes.
-
Jeroen about 10 yearsBoth the GRUB and the Linux Kernel complain about unknown device type. Am I missing a driver? How come ArchLinux will boot from USB?
-
Admin about 10 years@JeroenBollen - I doubt that a device driver is missing: the Arch kernel is compiled with just about every drive as a module. I still think you have an issue with /boot/grub/grub.cfg - running grub-mkconfig and getting an error is very suspicious.