You are not logged in.

#1 2013-08-25 15:07:03

71GA
Member
From: Slovenia
Registered: 2012-09-15
Posts: 282

Postinstalation problems {dual boot}

When installing the Arch i used command lsblk which returned something like this:

/dev/sda
/dev/sda1      100MB      (this is the windows 7 boot partition - NTFS)
/dev/sda2      97.8GB     (this is the windows 7 system partition - NTFS)
/dev/sda3      97.6GB     (this is the windows 7 data partition - NTFS)
/dev/sda4      250MB      (this is the Arch partition on which i mounted the "/boot" - ext4)
/dev/sda5      2GB        (this is the Arch swap partition - linuxswap)
/dev/sda6      100GB      (this is the Arch partition on which i mounted the "/" - ext4)

I tried to install the Arch using the standard procedure (for bootloader i chose syslinux), but after finishing the installation i tried to reboot and now neither my Windows 7 nor Arch are loaded at the startup. I will post here the commands i used regarding the bootloader as i think that my problem lies here somewhere.

After using arch-chroot /mnt  i instaled gptfdisk and used these commands:

cd /boot
mkdir extlinux
cd extlinux
extlinux --install .
dd conv=notrunc count=1 bs=440 count=1 if=usr/lib/syslinux/gptmbr.bin of=/dev/sda
sgdisk /dev/sda --attributes=1:set:2
cp ../syslinux/syslinux.cfg extlinux.conf
cp /usr/lib/syslinux/menu.c32 .
mkinitcpio -p linux

Then i restarted and the error occured. I tried to fix the error by booting into the installed Arch using the live CD, installing the grub and edited the file /boot/grub/custom.cfg like this:

menuentry "Arch" {
    set root=(hd0,4)
    linux /boot/vmlinuz
    initrd /boot/initrd.img
}

menuentry "Win 7" {
    set root=(hd0,1)
    chainloader +1
}

and then using the command:

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

Well neither restarting like this helped and now i am out of ideas.

Please i need an advice. I am suspicious about the number of the partitions which is quite large in my case. So should i use GPT? I think that the way i did it using syslinux created MBR? I like GRUB more than syslinux and would be glad if anyone could point out the mistake i did while trying to use the GRUB.


Thanks.

Last edited by 71GA (2013-08-25 15:08:46)


C, ARM, ARM assembly, HTML, CSS, JS, Linux

Offline

#2 2013-08-25 15:46:39

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,171
Website

Re: Postinstalation problems {dual boot}

Let me get this right:

1) You've installed Syslinux as described in the ArchWiki. However, it doesn't work.
2) You've edited some random file which looks like a GRUB-legacy configuration file, not GRUB2.
3) You've not run os-prober to get GRUB2 to look for other operating systems outside of Arch.
4) You've generated a grub.config file.
5) You've not run "grub-install /dev/sda", thus Arch is still trying to boot using Syslinux (which doesn't work because you haven't tried to fix it).

Am I right?

Also:

71GA wrote:

When installing the Arch i used command lsblk which returned something like this:

/dev/sda
/dev/sda1      100MB      (this is the windows 7 boot partition - NTFS)
/dev/sda2      97.8GB     (this is the windows 7 system partition - NTFS)
/dev/sda3      97.6GB     (this is the windows 7 data partition - NTFS)
/dev/sda4      250MB      (this is the Arch partition on which i mounted the "/boot" - ext4)
/dev/sda5      2GB        (this is the Arch swap partition - linuxswap)
/dev/sda6      100GB      (this is the Arch partition on which i mounted the "/" - ext4)

You are clearly already using a GPT because this ^ tells us is there is no Extended partition that you would find in an MBR set-up (If the GPT partition set-up had been changed to an MBR partition table, you would screaming about where your data is right now).

Last edited by clfarron4 (2013-08-25 16:12:20)


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#3 2013-08-25 19:33:16

71GA
Member
From: Slovenia
Registered: 2012-09-15
Posts: 282

Re: Postinstalation problems {dual boot}

You are right yes. But the file i edited looks just like GRUB2 format to me. Should i only run grub-install /dev/sda command to solve the problem? I dont need os/prober as i know where windows and linux are located.

Last edited by 71GA (2013-08-25 20:02:17)


C, ARM, ARM assembly, HTML, CSS, JS, Linux

Offline

#4 2013-08-25 19:42:44

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Postinstalation problems {dual boot}

@71GA,
That is not quite the response that was being looked for here.  clfarron4 was not trying to offend you, tell you that you're doing it wrong, or anything like that.  She was actually just trying to get confirmation on what you had actually done.  The only way to help you is to understand where you were in the process of trying to make things work.  Since Arch is so DIY, there is also the very real possibility that you might have caused some kind of issues in how you went about attempting to remedy the problem as well.  So trying to get a handle on what has been done so far is just a way of attempting to foresee any pitfalls before we get there.

So is what she described what you have done so far?

Offline

#5 2013-08-25 20:03:42

71GA
Member
From: Slovenia
Registered: 2012-09-15
Posts: 282

Re: Postinstalation problems {dual boot}

WonderWoofy wrote:

@71GA,
That is not quite the response that was being looked for here.  clfarron4 was not trying to offend you, tell you that you're doing it wrong, or anything like that.  She was actually just trying to get confirmation on what you had actually done.  The only way to help you is to understand where you were in the process of trying to make things work.  Since Arch is so DIY, there is also the very real possibility that you might have caused some kind of issues in how you went about attempting to remedy the problem as well.  So trying to get a handle on what has been done so far is just a way of attempting to foresee any pitfalls before we get there.

So is what she described what you have done so far?

I am sorry that i missunderstood the response. I fixed my previous response accordingly.


C, ARM, ARM assembly, HTML, CSS, JS, Linux

Offline

#6 2013-08-25 20:15:48

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Postinstalation problems {dual boot}

Knowing where windows and linux are does not mean that os-prober is not necessary.  Grub2 has a means of generating the grub.cfg for you.  It does this by sourcing the /etc/defualt/grub file and then running the scripts, lexicographically, in /etc/grub.d.  So there *should* be no reason to edit the grub.cfg anymore.  But this also means that if you want windows added to that config, you will need to install os-prober so that it is added to the grub.cfg.

I think the question now is how do you want to proceed?  It seems as though you are okay with either grub or syslinux, as long as something works.  But I am not certain about this.  You should know that since you are using GPT, if you want to use grub, you will need another (very small) partition in order to properly install grub.  Syslinux on the other hand can be installed with your partition table exactly as it is now.

Syslinux though, requires that you hand edit the syslinux.cfg file.  Though with Arch, this is typically pretty easy since old kernels are not kept and therefore the kernel name remains the same.  So upon updating the kernel, /boot/vmlinuz-linux will be replaced by the new version and the config will simply remain valid.

Personally I like syslinux, but that is just personal preference.  I don't particularly like that grub2 auto generates the config, but I have started keeping the UEFI version set up to boot the monthly isos. 

So if you want to use syslinux, you should edit the syslinux.cfg so that it makes sense (ie. root=/dev/sda6) and then run syslinux-install_update -i -a -m.

Offline

#7 2013-08-25 20:45:27

71GA
Member
From: Slovenia
Registered: 2012-09-15
Posts: 282

Re: Postinstalation problems {dual boot}

WonderWoofy wrote:

so that it makes sense (ie. root=/dev/sda6) and then run syslinux-install_update -i -a -m.

Should I allso add the entrz for the Windows like this?

 LABEL windows
         MENU LABEL Windows
         COM32 chain.c32
         APPEND hd0 3

I read that i should first copy (or symlink) the chain.c32 module to the Syslinux directory. How do i do that. I couldn-t find it in the Wiki.

Last edited by 71GA (2013-08-25 20:46:42)


C, ARM, ARM assembly, HTML, CSS, JS, Linux

Offline

#8 2013-08-25 21:36:39

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Postinstalation problems {dual boot}

If you use the syslinux-install_update script it will copy all the c32/com modules to the proper place for you.  They should go in /boot/syslinux, but I think that the symlink method is only acceptable if you are using a single partition that contains both /boot and / (otherwise, you are linking across two partitions).  The files in question are in the /usr/lib/syslinux directory if you want to do it manually.

Regarding the chainloading, you should read the wiki.  It is full of great information.  The syslinux wiki page is quite extensive, and gives a detailed description of what you are trying to do here.

Edit: I didn't see the part about not being able to find it in the wiki.  I'm not entirely sure how you couldn't find this, as it is in the table of contents.

Last edited by WonderWoofy (2013-08-25 21:37:54)

Offline

#9 2013-08-25 22:18:53

71GA
Member
From: Slovenia
Registered: 2012-09-15
Posts: 282

Re: Postinstalation problems {dual boot}

WonderWoofy wrote:

Edit: I didn't see the part about not being able to find it in the wiki.  I'm not entirely sure how you couldn't find this, as it is in the table of contents.

In the link right at the top of the page it says, citing: "If you want to chainload other operating systems (such as Windows) or boot loaders, copy the chain.c32 module to the Syslinux directory (for details, see the instructions in the previous section)."

Where is the chain.c32 module located? In the previous section it doesn't even mention it.

--------------

Well anyway i reinstalled the whole Arch and tried to install the bootloader like this:

pacman -S syslinux
lsblk 
syslinux-install_update -i -a -m
edit /boot/syslinux/syslinux.cfg

QUESTION 1:
When i inputed the syslinux-install_update -i -a -m i got a warning: "failed to set attribute Legacy BIOS Bootable on /dev/sda4". Can the cause of this be in the fact that i havent yet installed gptfdisk until this point. lsblk showed me that i have mountpoints "/boot" as well as "/".

QUESTION 2:
I have read that partitions in syslinux.cfg folder are counted from 1 and not 0, but when i opened this file i saw that my Archlinux section looked like this:

 LABEL arch
         MENU LABEL Arch Linux
         LINUX ../vmlinuz-linux
         APPEND root=/dev/sda3 rw
         INITRD ../initramfs-linux.img
 
 
 LABEL archfallback
         MENU LABEL Arch Linux Fallback
         LINUX ../vmlinuz-linux
         APPEND root=/dev/sda3 rw
         INITRD ../initramfs-linux-fallback.img

and i changed it to (i changed the root for Archlinux as well as added the windows section):

 LABEL arch
         MENU LABEL Arch Linux
         LINUX ../vmlinuz-linux
         APPEND root=/dev/sda4 rw
         INITRD ../initramfs-linux.img
 
 
 LABEL archfallback
         MENU LABEL Arch Linux Fallback
         LINUX ../vmlinuz-linux
         APPEND root=/dev/sda4 rw
         INITRD ../initramfs-linux-fallback.img

 LABEL windows
         MENU LABEL Windows
         COM32 chain.c32
         APPEND hd0 1

Does this looks ok according to the table which lsblk returns (my 1st post)? Should i rerun the command syslinux-install_update -i -a -m after changing the syslinux.cfg file?

Last edited by 71GA (2013-08-25 22:21:13)


C, ARM, ARM assembly, HTML, CSS, JS, Linux

Offline

#10 2013-08-25 22:44:35

71GA
Member
From: Slovenia
Registered: 2012-09-15
Posts: 282

Re: Postinstalation problems {dual boot}

I now installed gptfdisk and reran the command syslinux-install_update -i -a -m which installed syslinux withouth any problem.

After reboot i got the syslinux boot menu with Arch, Arch (fallback) and windows. But none of these now work. If i click any of two Arch choices i get the ERROR:"Root device mounted sucessfully but /sbin/init does not exist". And when i clicked Windows from those options i got same mistake as before.

Back in the dirt...

Is it possible that syslinux counts partitions from 0 and not 1???

Last edited by 71GA (2013-08-25 22:45:12)


C, ARM, ARM assembly, HTML, CSS, JS, Linux

Offline

#11 2013-08-25 22:55:07

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,725

Re: Postinstalation problems {dual boot}

I thought you said sda4 was /boot, why would you tell the kernel that it's root?

Edit:

71GA wrote:

Where is the chain.c32 module located? In the previous section it doesn't even mention it.

it's simple to find. You can check the file list of the package with "pacman -Ql syslinux | grep chain.c32" or you can just use the find command "find / -name chain.c32"

Last edited by Scimmia (2013-08-25 23:02:53)

Offline

#12 2013-08-25 23:08:07

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,171
Website

Re: Postinstalation problems {dual boot}

71GA wrote:

QUESTION 2:
I have read that partitions in syslinux.cfg folder are counted from 1 and not 0, but when I opened this file i saw that my Archlinux section looked like this...

That is not quite true. If you use the hd(0,X) notation for identifying partitions, things are counted from 1, not zero. If you use the /dev/sdaX notation, then things are counted from 0 (at least, that's what memory tells me).

EDIT: Ah, thanks Scimmia, I had the feeling there was something wrong after I pressed submit, but couldn't put my finger on it.

Last edited by clfarron4 (2013-08-25 23:12:05)


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#13 2013-08-25 23:09:45

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,725

Re: Postinstalation problems {dual boot}

clfarron4 wrote:
71GA wrote:

QUESTION 2:
I have read that partitions in syslinux.cfg folder are counted from 1 and not 0, but when I opened this file i saw that my Archlinux section looked like this...

That is not quite true. If you use the hd(X,Y) notation for identifying partitions, things are counted from 1, not zero. If you use the /dev/sdaX notation, then things are counted from 0.

Also not quite true. The hard drives are counted from 0, the partitions are counted from 1, including in the sdaX notation.

Last edited by Scimmia (2013-08-25 23:10:19)

Offline

#14 2013-08-25 23:12:59

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Postinstalation problems {dual boot}

I told you exactly where all the syslinux c32 files are in this post… first paragraph.  I don't know how to be any more clear than giving you the full path.

I think the above posters are right that if your partition layout is the same, then you are trying to tell the kernel command line that your root is /dev/sda4 when actually it should be /dev/sda6.  You are pointing it to the root partition (/) not the boot partition (/boot).

Offline

#15 2013-08-25 23:17:39

71GA
Member
From: Slovenia
Registered: 2012-09-15
Posts: 282

Re: Postinstalation problems {dual boot}

Scimmia wrote:

I thought you said sda4 was /boot, why would you tell the kernel that it's root?

What do you mean with that? Did i go wrong when appending the rw at the end of the APPEND sections for Arch like below. Windows is probably not working as i havent mooved the  chain.c32 into the syslinux folder yet. Could that be the case?

 LABEL arch
         MENU LABEL Arch Linux
         LINUX ../vmlinuz-linux
         APPEND root=/dev/sda4 rw
         INITRD ../initramfs-linux.img
 
 
 LABEL archfallback
         MENU LABEL Arch Linux Fallback
         LINUX ../vmlinuz-linux
         APPEND root=/dev/sda4 rw
         INITRD ../initramfs-linux-fallback.img

 LABEL windows
         MENU LABEL Windows
         COM32 chain.c32
         APPEND hd0 1

@clfarron4 @WonderWoofy i will keep that in mind thanks - maybee i messed it here...

Last edited by 71GA (2013-08-25 23:18:56)


C, ARM, ARM assembly, HTML, CSS, JS, Linux

Offline

#16 2013-08-25 23:22:51

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,725

Re: Postinstalation problems {dual boot}

"root=/dev/sda4" tells the kernel that you want sda4 mounted to / (root).

Offline

#17 2013-08-25 23:27:47

71GA
Member
From: Slovenia
Registered: 2012-09-15
Posts: 282

Re: Postinstalation problems {dual boot}

Scimmia wrote:

"root=/dev/sda4" tells the kernel that you want sda4 mounted to / (root).

So do i only change this to "boot=/dev/sda4" ? Do i have to allso specify "root=/dev/sda6"? I mean should i write it like this:

 LABEL arch
         MENU LABEL Arch Linux
         LINUX ../vmlinuz-linux
         APPEND boot=/dev/sda4 rw root=/dev/sda6
         INITRD ../initramfs-linux.img
 
 
 LABEL archfallback
         MENU LABEL Arch Linux Fallback
         LINUX ../vmlinuz-linux
         APPEND boot=/dev/sda4 rw root=/dev/sda6
         INITRD ../initramfs-linux-fallback.img

 LABEL windows
         MENU LABEL Windows
         COM32 chain.c32
         APPEND hd0 1

Is "root=/dev/sda6" even needed?


C, ARM, ARM assembly, HTML, CSS, JS, Linux

Offline

#18 2013-08-25 23:30:59

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,725

Re: Postinstalation problems {dual boot}

*sigh*

Why do you insist on telling the kernel that sda4 is involved? according to your first post sda4 doesn't come into play here at all.

Last edited by Scimmia (2013-08-25 23:31:29)

Offline

#19 2013-08-25 23:43:52

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,171
Website

Re: Postinstalation problems {dual boot}

This is what you want:

 LABEL arch
         MENU LABEL Arch Linux
         LINUX ../vmlinuz-linux
         APPEND root=/dev/sda6 rw 
         INITRD ../initramfs-linux.img
 
 
 LABEL archfallback
         MENU LABEL Arch Linux Fallback
         LINUX ../vmlinuz-linux
         APPEND root=/dev/sda6 rw
         INITRD ../initramfs-linux-fallback.img

 LABEL windows
         MENU LABEL Windows
         COM32 chain.c32
         APPEND hd0 1

When you installed Syslinux, it already knows to point at /dev/sda4 for the bootloader because you mounted that as /boot when you were installing it. What the syslinux.cfg file does is tell the bootloader where the kernel images are and where the rest of the system is.

Last edited by clfarron4 (2013-08-25 23:46:17)


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#20 2013-08-25 23:48:11

71GA
Member
From: Slovenia
Registered: 2012-09-15
Posts: 282

Re: Postinstalation problems {dual boot}

I was sooo used to specifying boot partitions for the bootloader that i did it automatically even here. I did manage to start the Arch Linux from the bootloader menu at the startup. But i still cannot start the Windows / i get the same mistake.

In the syslinux.cfg input for the Windows is now:

LABEL windows
         MENU LABEL Windows
         COM32 chain.c32
         APPEND hd0 1

 

where the hd0 1 is the 100MB boot partition (/dev/sda1) that Windows creates while installing. But the operating system itself is located on a 97.8GB system partition (/dev/sda2). Should i change input to:

LABEL windows
         MENU LABEL Windows
         COM32 chain.c32
         APPEND hd0 2

???

ADD: I have checked and file chain.c32 is already in the syslinux folder.

Last edited by 71GA (2013-08-25 23:48:55)


C, ARM, ARM assembly, HTML, CSS, JS, Linux

Offline

#21 2013-08-25 23:49:37

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,725

Re: Postinstalation problems {dual boot}

What happens when you try to boot Window? Did you finally get chain.c32 copied over?

Offline

#22 2013-08-26 00:01:24

clfarron4
Member
From: London, UK
Registered: 2013-06-28
Posts: 2,171
Website

Re: Postinstalation problems {dual boot}

71GA wrote:

In the syslinux.cfg input for the Windows is now:

LABEL windows
         MENU LABEL Windows
         COM32 chain.c32
         APPEND hd0 1

 

where the hd0 1 is the 100MB boot partition (/dev/sda1) that Windows creates while installing.

I think you should leave it like this, and not APPEND hd0 2, because hd0 1 contains the files needed to boot Windows. On my Laptop 1, GRUB2 points to the Windows Boot partition, not the partition where Windows Operating System is.

Last edited by clfarron4 (2013-08-26 00:02:49)


Claire is fine.
Problems? I have dysgraphia, so clear and concise please.
My public GPG key for package signing
My x86_64 package repository

Offline

#23 2013-08-26 00:14:28

71GA
Member
From: Slovenia
Registered: 2012-09-15
Posts: 282

Re: Postinstalation problems {dual boot}

I tried to reboot in windows and here is the ERROR that i get:

File: \boot\BCD
Status: 0xc000000e
Info: An error occured while attempting to read the boot configuration data.

C, ARM, ARM assembly, HTML, CSS, JS, Linux

Offline

#24 2013-08-26 00:15:41

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: Postinstalation problems {dual boot}

Wait, if you are using GPT, and you have windows installed… then your windows installation is UEFI.

Offline

#25 2013-08-26 00:16:33

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,725

Re: Postinstalation problems {dual boot}

So syslinux is successfully chainloading Windows, it's Windows throwing the error. Did you do any resizing or moving of partitions?

Offline

Board footer

Powered by FluxBB