tinkering with windows boot manager

Post here if you are a new Porteus member and you're looking for some help.
port
Samurai
Samurai
Posts: 137
Joined: 18 Feb 2016, 09:25
Distribution: Linux porteus 3.2.2 KDE
Location: Spain

tinkering with windows boot manager

Post#1 by port » 12 Jul 2017, 11:44

This is a question for all those windows users out there, I'm totally dumb in windows questions but now I have a machine with a windows installed and I'm forced to boot up into windows system.

This new machine came with a windows 10 installed in a SDD disk, so I connected my two hard disks (porteus 3.2.2 is installed in one of them, the other is just data) to this new pc, so now there's 4 SATA devices: original SDD hard disk, DVD and my two old hard disks added.

Code: Select all

# fdisk -l /dev/sda
Disk /dev/sda: 238.5 GiB, 256060514304 bytes, 500118192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xef69f2c1

Device     Boot   Start       End   Sectors  Size Id Type
/dev/sda1  *       2048   1026047   1024000  500M  7 HPFS/NTFS/exFAT
/dev/sda2       1026048 500113407 499087360  238G  7 HPFS/NTFS/exFAT


# fdisk -l /dev/sdb
Disk /dev/sdb: 232.9 GiB, 250000000000 bytes, 488281250 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0001425c

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sdb1            2048 476209151 476207104 227.1G 83 Linux
/dev/sdb2       476211198 488280063  12068866   5.8G  5 Extended
/dev/sdb5       476211200 488280063  12068864   5.8G 82 Linux swap


# fdisk -l /dev/sdc
Disk /dev/sdc: 232.9 GiB, 250000000000 bytes, 488281250 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0001425c

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sdc1  *           63 476214794 476214732 227.1G 83 Linux
/dev/sdc2       476214795 488279609  12064815   5.8G 82 Linux swap
root@porteus:/home/guest# 
/dev/sda seems to be the SDD windows disk, /dev/sdb is my old hard disk with data and finally /dev/sdc is my old hard disk with porteus 3.2.2 installed

As you can see the disk /dev/sda has two partitions (sda1 and sda2) and only first partition sda1 is bootable, so I assume this is the partition to use (and also assume it's UEFI but dunno)

Since I like my porteus system where I have all my data and tools I want to setup a dual boot, so I want to add a "porteus boot option" to windows 10 boot manager menu but I don't know how to do it because never used windows that way, so if anybody knows about please tell

Before I tried to boot windows 10 from porteus modifying porteus.cfg in boot/syslinux but without success, it seems COM32 is too old to deal with ntldr, I don't know if the windows system is a UEFI (I suppose it is) or not, here's the relevant parts of my porteus.cfg

Code: Select all

LABEL hd1
MENU LABEL Boot from the first hd
COM32 chain.c32
APPEND hd0 1
TEXT HELP
    boot the first partition of 
    the hard drive
ENDTEXT

LABEL hd2
MENU LABEL Boot from the first hd 2
COM32 chain.c32
APPEND hd0 2
TEXT HELP
    boot the first partition of 
    the hard drive
ENDTEXT
My assumption is that it should boot from option hd1 but it doesn't and neither from hd2 so, any idea?

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: tinkering with windows boot manager

Post#2 by Ed_P » 12 Jul 2017, 13:44

port do a ls /mnt/sda1 command, if it shows an EFI folder than the machine is definitely a UEFI machine. And if it is I recommend you install Grub2Win on the Windows system. It is what I use. Grub2Win installs grub2 to the Windows boot loader and the Windows EFI boot loader thus when you boot you will have a grub2 menu from which you get to choose what you boot to. :good: The grub2 menu you customize to fit your needs.
Ed

port
Samurai
Samurai
Posts: 137
Joined: 18 Feb 2016, 09:25
Distribution: Linux porteus 3.2.2 KDE
Location: Spain

Re: tinkering with windows boot manager

Post#3 by port » 12 Jul 2017, 16:46

Ed_P wrote:port do a ls /mnt/sda1 command, if it shows an EFI folder than the machine is definitely a UEFI machine. And if it is I recommend you install Grub2Win on the Windows system. It is what I use. Grub2Win installs grub2 to the Windows boot loader and the Windows EFI boot loader thus when you boot you will have a grub2 menu from which you get to choose what you boot to. :good: The grub2 menu you customize to fit your needs.
ok I had to mount it read only due to strange things about that partion but here you are the content:

Code: Select all

# mount /mnt/sda1
The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Failed to mount '/dev/sda1': Operation not permitted
The NTFS partition is in an unsafe state. Please resume and shutdown
Windows fully (no hibernation or fast restarting), or mount the volume
read-only with the 'ro' mount option.

# mount -o ro /mnt/sda1
# ls /mnt/sda1
$WINRE_BACKUP_PARTITION.MARKER*  BOOTNXT*  BOOTSECT.BAK*  Boot/  Recovery/  System\ Volume\ Information/  bootmgr*
it should mounted it properly since it is in my fstab:

Code: Select all

# grep sda1 /etc/fstab 
/dev/sda1 /mnt/sda1 ntfs-3g users,noatime,nodiratime,suid,dev,exec,async,comment=x-gvfs-show 0 0                                            
it seems there's no EFI folder so I suppose it's not a UEFI boot manager

Ok so why it doesn't work from porteus.cfg ?

it doesn't work neither of these configurations:

Code: Select all

LABEL hd
MENU LABEL first hd
COM32 chain.c32
APPEND hd0 1

LABEL bootmgr
MENU LABEL Windows Boot Manager
COM32 chain.c32
APPEND ntldr=bootmgr

User avatar
Blaze
DEV Team
DEV Team
Posts: 3869
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus current ☯ all DEs ☯
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

Re: tinkering with windows boot manager

Post#4 by Blaze » 12 Jul 2017, 16:47

port, if you use 2 or more disks (1st with Windows, 2nd with Porteus) how about press F11 (or another boot menu button) and choose what do you want to boot when BIOS is boot up?
Linux 6.6.11-porteus #1 SMP PREEMPT_DYNAMIC Sun Jan 14 12:07:37 MSK 2024 x86_64 Intel(R) Xeon(R) CPU E3-1270 v6 @ 3.80GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

port
Samurai
Samurai
Posts: 137
Joined: 18 Feb 2016, 09:25
Distribution: Linux porteus 3.2.2 KDE
Location: Spain

Re: tinkering with windows boot manager

Post#5 by port » 12 Jul 2017, 19:01

Blaze wrote:port, if you use 2 or more disks (1st with Windows, 2nd with Porteus) how about press F11 (or another boot menu button) and choose what do you want to boot when BIOS is boot up?
yes that works pretty well but it's not a valid solution for a day to day basis because I don't want to enter boot anytime I want to boot in a different OS, that is the reason boot managers exist! ;-)

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: tinkering with windows boot manager

Post#6 by Ed_P » 12 Jul 2017, 19:12

Grub2Win will work on that machine and give you what you want.

https://sourceforge.net/projects/grub2w ... rce=navbar
Ed

hypomania
Samurai
Samurai
Posts: 130
Joined: 10 Mar 2011, 10:50
Distribution: Windows phone
Location: Saudi Arabia

Re: tinkering with windows boot manager

Post#7 by hypomania » 13 Jul 2017, 04:42


port
Samurai
Samurai
Posts: 137
Joined: 18 Feb 2016, 09:25
Distribution: Linux porteus 3.2.2 KDE
Location: Spain

Re: tinkering with windows boot manager

Post#8 by port » 14 Jul 2017, 13:11

Ed_P wrote:Grub2Win will work on that machine and give you what you want.

https://sourceforge.net/projects/grub2w ... rce=navbar
yes this seems would be the solution, even when I would prefer not to install grub on SDD disk in order not to modify the disk. Thanks!

User avatar
Blaze
DEV Team
DEV Team
Posts: 3869
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus current ☯ all DEs ☯
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

Re: tinkering with windows boot manager

Post#9 by Blaze » 17 Jul 2017, 10:14

What about simple way with EasyBСD (look at this post)?
Linux 6.6.11-porteus #1 SMP PREEMPT_DYNAMIC Sun Jan 14 12:07:37 MSK 2024 x86_64 Intel(R) Xeon(R) CPU E3-1270 v6 @ 3.80GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

Post Reply