Author
Topic: Can I boot from the Windows 7 Loader? (Read 927 times)

I squeezed a microcore frugal installation on my hard disk, between the Windows and the Lubuntu partition.

The idea is to use it as an emergency partition to fix Lubuntu (or Windows) whenever I mess it up - and it happens a lot - without needing the Lubuntu Live USB pendrive.

I like to keep the Windows bootloader in place and use it to boot every OS (I know it's a bad idea)

To boot Lubuntu from the Windows bootlader I installed grub2 on the Lubuntu partition itself (something like /dev/sda7 instead of /dev/sda) and copied the first 512B into C:\lubuntu.bin which I can launch from the Windows boot.

I can't do the same with TinyCore because when TinyCore is not running, everything is compressed and I don't have the complete filesystem

I tried to boot TinyCore from a USB stick and

grub-install --root-directory=/dev/sda8/tce /dev/sda8

But I get an error like "/dev/sda8/tce/boot/grub/stage1 not read correctly"

I tried some other things (like grub-install /dev/sda8) but still, it's like there is no linux on /dev/sda8 because as far as I understood the filesystem is created on RAM and it runs from there, there is not really a linux installation on the hard disk

Is there some other way that I can boot TinyCore from the Windows7 bootloader?

I only have two requirements:

1) Keep the Windows7 bootloader in place, as the first thing to show up at boot

2) booting whatever basic linux console from the hard disk, without having to insert any external storage or the network cable. I don't need persistence or desktop environment

To boot Lubuntu from the Windows bootlader I installed grub2 on the Lubuntu partition itself (something like /dev/sda7 instead of /dev/sda) and copied the first 512B into C:\lubuntu.bin which I can launch from the Windows boot.

Then do the same thing on /dev/sda8 and edit that config file to point to the kernel and initrd.

Quote

I squeezed a microcore frugal installation on my hard disk, between the Windows and the Lubuntu partition.

Then that partition must have a kernel (vmlinuz) and an initrd (core.gz) on it. Probably under /boot.

I tried to install grub2 from Lubuntu but there is not enough space on the microcore partition (just 18MB!!). I have to enlarge it and try again. A good idea would be to give it 1GB or so and then shrink it back when everything works

Anyway I was asking for a different approach since TinyCore is not Ubuntu and trying to boot it the same way might be conceptually wrong

Hi mflorisA less direct way would be to add a menu entry to the grub config file in your Lubuntu partition to sda8. When the Windowsbootloader comes up you select grub2, then when grub2 comes up you select Tinycore.

I agree with Rich; plus to be honest there's no reason Tiny/Micro can't live WITH your Lubuntu (sda7)

Simply create a home for microcore to reside (such as sda7/microcore), add another grub menu item, this one pointing to sda7/microcore/vmlinuz and sda7/microcore/core.gz respectively and voila... you're done! You might even want to rename your Lubuntu entry in Windows boot manager to just "Linux" and have your Grub manager deal with the menu of which flavor.

What happens afterward is simple...MicroCore boots up from sda7, loads the kernel and init image into memory and once it's finished, has no further need for sda7 and disconnects from it, leaving the 'buntu partition rather protected as well. At this stage, you'd never know 'buntu existed as the file structure is from within the init image, not the hard drive.

Based on all of the concepts within this post, might I suggest the ultimate fail-safe?"IF" the computer in question is capable (in BIOS) I'd recommend installing TinyCore onto a USB device (they're only a few $ in today's market) and have your bios set to boot from USB first, followed by CD/DVD, followed by Hard Drive(s).

Without the USB device plugged in, BIOS will see this and skip to the next device, the Cd/DVD drive.If that's empty (or non-bootable media is in it) it moves forward to the hard drive.This way, regardless of what's wrong (file system corruption, master boot record (MBR) is trashed, GRUB took a vacation, etc.) you can set up your USB pen drive to not only boot the machine, but to contain different utilities to assist with correcting common problems. (Be sure to install NTFS and DOS file system support and tools; if this is done, you can copy the registry, startup files, copies of the boot records (etc.) on the USB pen in case something did go South, you've got the files to help get you back on track!)

The netbook has 3 USB ports and one SD reader, but the BIOS can't boot from the SD.

I use the USBs a lot and I wouldn't want to have something sticking from the side anyway (no matter how small the pendrive).

What I can do is buy one of those SD cards that flips into a USB drive and leave it always inside the SD card slot (which I rarely use)

This way, if something fail, I can just pop the SD out, flip it, stick it into a USB port and boot TinyCore

I wanted to be able to boot tinycore from the Windows loader but all in all you're right, if this has to be a failsafe tool it only makes sense that it stays physically "inside" the computer but not on the hard drive

# embed core.img into bootable filecat /usr/lib/grub/i386-pc/lnxboot.img /boot/grub/i386-pc/core.img >/media/win/grub4bcd.imgHell, you don't even need to boot Linux, just extract those files from your Linux partition using some free tool and concatenate them.

But I get an error like "/dev/sda8/tce/boot/grub/stage1 not read correctly"

I tried some other things (like grub-install /dev/sda8) but still, it's like there is no linux on /dev/sda8 because as far as I understood the filesystem is created on RAM and it runs from there, there is not really a linux installation on the hard disk...