Tiny Core Base > TCB Tips & Tricks
Howto dual boot tinycore and windows on a laptop using grub2
Juanito:
I'm not saying this is the best or optimum way to do this, but it is a way to do it.
Use the laptop to boot tinycore from a usb stick.
Not essential, but to ensure the existing single partition on the laptop hard drive does not contain retrievable data:
--- Code: ---$ tce-load -i coreutils
$ sudo shred --verbose -n1 /dev/sda1
--- End code ---
Then use fdisk to create four primary partitions:
--- Code: ---$ sudo fdisk /dev/sda
d [delete partition]
n [add partition]
t [set filesystem]
a [set bootable]
w [write filesystem]
--- End code ---
sda1: ntfs code 7 [set bootable]
sda2: linux filesystem code 83 [set bootable]
sda3: linux swap code 82
sda4: linux filesystem code 83
Next make the file systems:
--- Code: ---$ tce-load -i ntfsprogs
$ sudo mkntfs /dev/sda1
$ sudo mkfs.ext4 /dev/sda2
$ sudo mkswap /dev/sda3
$ sudo mkfs.ext4 /dev/sda4
--- End code ---
Now reboot the laptop from a windows-7 dvd - when it asks, install it to the first partition, which will require several re-boots.
Once windows-7 has finally installed, reboot the laptop from the tinycore usb stick and copy the tinycore boot files from the usb stick to the second partition:
--- Code: ---$ sudo mount /dev/sda2
$ sudo mkdir /mnt/sda2/boot
$ sudo cp /mnt/sdb1/boot/rootfs.gz /mnt/sda2/boot
[repeat for modules.gz, vmlinuz, rootfs64.gz, modules64.gz, vmlinuz64]
--- End code ---
Install grub2 to the second partition:
--- Code: ---$ tce-load -i grub2
$ sudo grub-install --boot-directory=/mnt/sda2/boot /dev/sda
--- End code ---
Note when using a (u)efi boot machine to make a bios boot add "--target=i386-pc"
Use vi or other text editor to creat a grub2 configuration file such that:
--- Code: ---$ cat /mnt/sda2/boot/grub/grub.cfg
insmod ext2
menuentry "rootfs" {
set root=(hd0,2)
linux /boot/vmlinuz quiet text
initrd /boot/rootfs.gz /boot/modules.gz
}
menuentry "rootfs64" {
set root=(hd0,2)
linux /boot/vmlinuz64 quiet tce=sda2/tce64 text
initrd /boot/rootfs64.gz /boot/modules64.gz
}
menuentry "windows" {
insmod chain
insmod ntfs
set root=(hd0,1)
chainloader +1
}
--- End code ---
You can now reboot and use the grub2 menu to choose between tinycore, corepure64 and windows.
Misalf:
Does deleting the current partition (f.e. Windows) in order to be able to create new partitions have any benefit compared to shrinking the current partition (apart from the potential risk of non successful shrinking)?
What is the questionmark symbol doing there?
--- Code: ---...
}
?
menuentry "windows" {
...
--- End code ---
Misalf:
Phew... I nearly fired up shred in the terminal just to see what it does but figured I should ask the web first. Turned out it's kind of an equivalent to format c: .
Might to warn us with poor man's terminology. :p
Juanito:
If you had an existing windows laptop you could use ntfsprogs or gparted to shrink the windows partion (I've done this a couple of times), but this introduces more scope for problems. I was making the assumption of starting with a hard disk with nothing useful on it.
Errant "?" removed - thanks
Ref shred - I did make a comment about ensuring that the "hard drive does not contain retrievable data"
Misalf:
So this seems to be the way to install TinyCore (+ dual boot) while following its philosophy - Using only what you really need. Which actually makes it quite simple. Thanks.
--- Quote ---Ref shred - I did make a comment about ensuring that the "hard drive does not contain retrievable data"
--- End quote ---
Yes, you did. I see you don't say 'erasing' or 'deleting' as that's not what shred does.
Also for someone with good knowledge in the english language, "shred" doesn't need any further explaination.
I guess I'm more used to read tutorials for the masses.
Navigation
[0] Message Index
[#] Next page
Go to full version