LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   4MLinux (https://www.linuxquestions.org/questions/4mlinux-115/)
-   -   Install without the bootloader (https://www.linuxquestions.org/questions/4mlinux-115/install-without-the-bootloader-4175663300/)

ychaouche 10-28-2019 08:19 AM

Install without the bootloader
 
I would like to install4M without installing the bootloader. What are the required lines I need to add in my current grub installation to boot 4M Linux ? (grub legacy 0.97)

Rickkkk 10-28-2019 10:24 AM

Quote:

Originally Posted by ychaouche (Post 6051441)
I would like to install4M without installing the bootloader. What are the required lines I need to add in my current grub installation to boot 4M Linux ? (grub legacy 0.97)

Hi ychaouche,

I am presuming from your information that there is another linux system on this same computer with an existing installation of grub legacy ... You could confirm the details of this so that we're all sure.

If so, you could boot back into your existing linux system after installing 4M and run the grub config command to update with the new linux install. Make sure osprober is installed so that the command looks for other systems. The command would be :

Code:

grub-mkconfig -o /boot/grub/grub.cfg
Make sure the grub.cfg file location is according to your installation and I recommend checking the generated grub.cfg file against the output of the lsblk -f command before rebooting.

Let us know how you make out.

Cheers,

colorpurple21859 10-28-2019 11:16 AM

Without information on disk/partition setup it is only a guess, 4m is based on Debian so something like this might work
Code:

menuentry 4Mlinux
root=(hd0,?)
kernel /vmlinuz root=/dev/sda??
initrd /initrd.img

#? is number of partition counting from 0
?? is number of partition counting from 1

zk1234 10-28-2019 06:17 PM

Quote:

Originally Posted by colorpurple21859 (Post 6051510)
it is only a guess, 4m is based on Debian

No, it is not.
Quote:

Originally Posted by colorpurple21859 (Post 6051510)
Code:

menuentry 4Mlinux
root=(hd0,?)
kernel /vmlinuz root=/dev/sda??
initrd /initrd.img


I do not use legacy GRUB. However, by default, there is no initrd in 4MLinux, and the location of the kernel image is /boot/bzImage.

.

zk1234 10-28-2019 06:22 PM

Quote:

Originally Posted by ychaouche (Post 6051441)
I would like to install4M without installing the bootloader. What are the required lines I need to add in my current grub installation to boot 4M Linux ? (grub legacy 0.97)

Why not use GRUB included in 4MLinux? See point 9 here:
http://4mlinux.blogspot.com/2013/01/...-your-hdd.html

.

frankbell 10-28-2019 06:25 PM

A web search for "add distro to GRUB" will turn up a number of articles, tutorials, and even a video or two.

colorpurple21859 10-28-2019 06:39 PM

Quote:

No, it is not.
Sorry about that I was confusing it with MX linux
then it would be kernel /boot/bzImage root=something
without the initrd line.

ychaouche 10-29-2019 07:53 AM

sf.net was down (ongoing DDoS attack), so in the meantime I tried to boot NuTyX, which is installed on /dev/sda9

Code:

ychaouche#ychaouche-PC 10:15:54 ~ $ sudo os-prober
[sudo] password for ychaouche:
  No volume groups found
/dev/sda1:Windows 7 (loader):Windows:chain
/dev/sda9:NuTyX GNU/Linux (rolling):NuTyX:linux    #<-------------------- Hello NuTyX !
ychaouche#ychaouche-PC 10:45:30 ~ $

I seem to have grub legacy installed, because changes I make to /boot/grub/menu.lst are visible when I reboot. But when I do and select NuTyX I get error 17 : cannot mount selected partition.

Here's the NuTyX's corresponding entry in /boot/grub/menu.lst :

Code:

title          NuTyx (yassine)
root            (hd0,8)
kernel          /boot/kernel-lts root=/dev/sda9 ro splash pci=noaer

NuTyX doesn't use initrd.

And here's output of fdisk -l

Code:

ychaouche#ychaouche-PC 11:06:49 ~ $ sudo fdisk -l
[sudo] password for ychaouche:

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x90909090

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1            2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/sda2          206848  614606847  307200000    7  HPFS/NTFS/exFAT
/dev/sda3      614606848  1229006847  307200000    7  HPFS/NTFS/exFAT
/dev/sda4      1229008894  1953523711  362257409    5  Extended
Partition 4 does not start on physical sector boundary.
/dev/sda5      1229008896  1268068351    19529728  83  Linux
/dev/sda6      1268070400  1424318463    78124032  83  Linux
/dev/sda7      1424320512  1439942655    7811072  82  Linux swap / Solaris
/dev/sda8      1439944704  1491302399    25678848  83  Linux
/dev/sda9  *  1491304448  1578485759    43590656  83  Linux
ychaouche#ychaouche-PC 11:06:53 ~ $


If useful, this is the output of blkid

Code:

ychaouche#ychaouche-PC 11:20:36 ~ $ blkid
/dev/sda1: LABEL="RM-CM-)servM-CM-) au systM-CM-(me" UUID="2C1AE3A61AE36B72" TYPE="ntfs"
/dev/sda2: UUID="367A3A5F7A3A1BD5" TYPE="ntfs"
/dev/sda3: LABEL="UserData" UUID="2CC6D327C6D2EFD6" TYPE="ntfs"
/dev/sda5: LABEL="This is Mint" UUID="3e260f17-2ab1-49ae-a2d5-5f586e6df1b4" TYPE="ext4"
/dev/sda6: LABEL="This is home" UUID="8ec978fe-39d3-4c9b-ab57-4eaf4b975dd7" TYPE="ext4"
/dev/sda7: UUID="8f8b25c2-3922-4da4-a2ea-48e5b31d6058" TYPE="swap"
/dev/sda8: LABEL="This is var" UUID="0f1a9dcd-21bc-4270-b941-ad8dbc620ebd" TYPE="ext4"
/dev/sda9: UUID="dd356042-8006-4d27-af85-fe277cbb54b1" UUID_SUB="01560a90-fc8c-4d67-8b84-0e802757539b" TYPE="btrfs"
ychaouche#ychaouche-PC 11:20:38 ~ $

Could it be that grub legacy doesn't know how to load a btrfs filesystem ?

ychaouche 10-29-2019 07:57 AM

hum... well according to archwiki, it doesn't :(

Quote:

GRUB legacy does not support GPT disks, Btrfs filesystem and UEFI firmwares.

Rickkkk 10-29-2019 08:06 AM

Quote:

Originally Posted by ychaouche (Post 6051860)
hum... well according to archwiki, it doesn't :(

... good to know. I've always used ext4 for linux, so I've never run across this limitation. Furthermore, I haven't used GRUB Legacy for quite a while either.

There are a number of other boot loading solutions you can move to : GRUB (current version), Syslinux, rEFInd, or even straight from UEFI (assuming your computer's UEFI implementation is standard ...).

Cheers,

ychaouche 10-29-2019 09:43 AM

1. Booted Mint
2. chrooted to NuTyX
3. Changed /boot/grub/grub.cfg to add necessary entry for Mint

Quote:

function recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}

function gfxmode {
set gfxpayload="$1"
if [ "$1" = "keep" ]; then
set vt_handoff=vt.handoff=7
else
set vt_handoff=
fi
}


menuentry 'Linux Mint 17 KDE 64-bit, 4.4.0-98-generic (/dev/sda5)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 --hint='hd0,msdos5' 3e260f17-2ab1-49ae-a2d5-5f586e6df1b4
else
search --no-floppy --fs-uuid --set=root 3e260f17-2ab1-49ae-a2d5-5f586e6df1b4
fi
linux /boot/vmlinuz-4.4.0-98-generic root=UUID=3e260f17-2ab1-49ae-a2d5-5f586e6df1b4 ro quiet splash $vt_handoff pci=noaer
initrd /boot/initrd.img-4.4.0-98-generic
}

4. Installed NuTyX's grub 2 in the boot sector
5. rebooted

Now I can boot both NuTyX and Mint :p

Rickkkk 10-29-2019 09:47 AM

Quote:

Originally Posted by ychaouche (Post 6051901)
Installed NuTyX's grub 2 in the boot sector
5. rebooted

Now I can boot both NuTyX and Mint :p

Congrats and welcome to GRUB 2 ;).


All times are GMT -5. The time now is 09:37 PM.