Re: Blessable Boot Partition
Quote:
Originally Posted by
user12021
Hello.
I currently have all my Linux files on one ext3 partition.
I would like to move all of my boot files to a separate partition (with a filesystem that I can mount (r/w) in Mac OS X)
It would have to be HFS, HFS+ (preferable), MSDOS (FAT12, 16 or 32), or UFS.
That way I can, mount it in OSX, run the bless command, add my own volume icon and labelfile, and use my firmware's built in boot menu instead of that awful rEFIt.
If that's impossible, I can move the boot files to an ext2 volume, which the firmware can boot from, but I can't bless them if I do that.
I was able to do something like this when I was using Fedora. Is there a way I can do this in Ubuntu?
By boot files, do you mean the boot loader or the whole /boot directory (vmlinuz intird.img ...)? Why would you need to use a separate /boot?
You can put an efi bootloader (which I am using) in Macosx or any hfsplus partition and use macosx to bless it and maintain it.
Refit can show custom icons.
On the Apple boot screen (without refit) I can show small graphical labels using bless --labelfile, have not so far managed to change the big Apple icons.
The grub.efi bootloader works well, the current development requires disabling accelerated graphics (agpgart *_agp ).
Refit is a very useful tool, keep it, even if you dont boot with it.
Re: Blessable Boot Partition
Quote:
By boot files, do you mean the boot loader or the whole /boot directory (vmlinuz intird.img ...)? Why would you need to use a separate /boot?
That's what i had when using Fedora, but I don't really need it. It can just be the bootloader.
Quote:
You can put an efi bootloader (which I am using) in Macosx or any hfsplus partition and use macosx to bless it and maintain it.
That's what i'm trying to do.
Quote:
On the Apple boot screen (without refit) I can show small graphical labels using bless --labelfile, have not so far managed to change the big Apple icons.
you can also use bless --label name
i believe creating a file called .volumeicon.icns in the root level of the partition will do this.
Quote:
The grub.efi bootloader works well, the current development requires disabling accelerated graphics (agpgart *_agp ).
it's compiling as i type
Is that all I need to use?
3 Attachment(s)
Re: Blessable Boot Partition
What version have you got? (svn1913 here)
edit /.volumeicons.icns
works
Re: Blessable Boot Partition
I got it from subversion today, so it's probably the newest.
I can't get it to work. If I try to choose grub from apple's boot menu, it just goes straight to rEFIt.
If I try to choose grub from rEFIt, it says "unsupported while loading grub.efi"
What am I doing wrong?
Also, what should my grub.cfg file look like?
my disk is formatted like this:
OSX on 2nd partition
Grub on 3rd
Linux on 4th
Re: Blessable Boot Partition
Quote:
Originally Posted by
user12021
I got it from subversion today, so it's probably the newest.
I can't get it to work. If I try to choose grub from apple's boot menu, it just goes straight to rEFIt.
If I try to choose grub from rEFIt, it says "unsupported while loading grub.efi"
What am I doing wrong?
Also, what should my grub.cfg file look like?
my disk is formatted like this:
OSX on 2nd partition
Grub on 3rd
Linux on 4th
Probably missing some modules, but you got a start.
grub.efi should be around 250KB with the preloaded modules.
I am just putting together a grub efi tarball here with working grub.efi grub.cfg and modules, should help you, should be about an hour. Would be glad to get your reactions.
For that I will open a new thread with a more grubby title.
Here is some of it -
----------------------
These are the preloaded modules in my grub.efi -
apple appleldr boot cat chain configfile cpio date ext2 echo fat gpt help hexdump hfs hfsplus iso9660 linux ls normal pc reboot reiserfs scsi search sleep xfs
These are all the modules in the grub directory alongside grub.efi
Code:
pxw@wdc:~/src/grub2/build$ ls *.mod
acorn.mod _chain.mod echo.mod help.mod ls.mod raid6rec.mod terminfo.mod
affs.mod chain.mod elf.mod hexdump.mod lspci.mod raid.mod test.mod
afs.mod cmp.mod ext2.mod hfs.mod lvm.mod read.mod udf.mod
amiga.mod configfile.mod fat.mod hfsplus.mod mdraid.mod reboot.mod ufs.mod
appleldr.mod cpio.mod font.mod iso9660.mod minix.mod reiserfs.mod vga_text.mod
apple.mod cpuid.mod fshelp.mod jfs.mod normal.mod scsi.mod xfs.mod
at_keyboard.mod crc.mod fs_uuid.mod kernel.mod ntfscomp.mod search.mod
blocklist.mod datehook.mod gpt.mod _linux.mod ntfs.mod sfs.mod
boot.mod date.mod gzio.mod linux.mod pci.mod sleep.mod
bufio.mod datetime.mod halt.mod loadenv.mod pc.mod sun.mod
cat.mod dm_nv.mod hello.mod loopback.mod raid5rec.mod terminal.mod
--------------------
grub.cfg
Code:
## grub svn v1913 configure --with-platform=efi
## 20081128 pxw
## example
## comments apply to MacBook2,1 with 1 internal HD and CD, used with various external drives.
## linux root=/dev/sdxx and grub loads kernel from root=(hdx,x). Will need check/edit.
##
timeout=20
## first menuentry is 0
default=0
fallback=1
## for booting from 'e' edited menuentry control x does not work.
set F1=ctrl-x
set F2=ctrl-c
#
# boot the first macosx found
menuentry "search MacOSX" {
search --set /usr/standalone/i386/boot.efi
chainloader /usr/standalone/i386/boot.efi
}
#
# search for vmlinuz starts from (hd0,1)
# with only one drive (no cd or usb) it will be grub (hd0) and linux /dev/sda
# boot first /vmlinuz found and use linux root=/dev/sda4
menuentry "search-vmlinuz root=sda4" {
search --set /vmlinuz
linux /vmlinuz root=/dev/sda4 agp=off video=efifb
initrd /initrd.img
}
#
# with a usb drive present usb is (hd0) but /dev/sdb, internl hd is (hd1) but sda
# usb will be found first
menuentry "search-vmlinuz root=sdb3" {
search --set /vmlinuz
linux /vmlinuz root=/dev/sdb3 agp=off video=efifb
initrd /initrd.img
}
#
# boot ubuntu on HD (hd1) at /dev/sda4.
#
# boot (hd1,4)/vmlinuz and use root=/dev/sda4
menuentry "set hd1,4 vmlinuz" {
root=(hd1,4)
linux /vmlinuz root=/dev/sda4 ro video=efifb
initrd /initrd.img
}
# appleloader boots from internals only - cd or hd.
menuentry "Boot from ISO CD" {
appleloader CD
}
menuentry "Boot from HD MBR" {
appleloader HD
}
## optional extras
menuentry "Partition List" {
ls -l
sleep 5
}
menuentry "Where am I" {
set
ls
date
echo "sda2?? edit this"
sleep 10
}
menuentry "REBOOT" {
reboot
}
menuentry "set pager=1" {
set pager=1
}
##
Re: Blessable Boot Partition
More on new thread
grub2 EFI boot loader internal/external booting
http://ubuntuforums.org/showthread.php?t=995704
Re: Blessable Boot Partition
It almost works:
when I choose Linux in GRUB, It prints a bunch of text for about 3 seconds, then every five seconds it prints this:
Code:
ata5.00: status: { DRDY }
ata5: soft resetting link
ata5.00: configured for PIO0
ata5: EH complete
ata5.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
ata5.00: cmd a0/00:00:00:24:00/00:00:00:00:00/a0 tag 0 pio 36 in
cdb 12 00 00 00 24 00 00 00 00 00 00 00 00 00 00 00
res 40/00:00:00:00:00/00:00:00:00:00/ Emask 0x4 (timeout)
At 30 seconds, it says this, then continues to print the first one over and over
Code:
Done.
Gave up waiting for root device. Common problems:
- Boot args (cat /proc/cmdline)
- Check rootdelay= (did the system wait long enough?)
- check root= (did the system wait for the right device?)
- Missig modules (cat /proc/modules;ls /dev)
ALERT! /dev/sda4 does not exist. Dropping to a shell!
I know it must be a problem with my grub.cfg file.
I used the one that you uploaded, but I know that probably won't work.
What should I change to get it to work on my system?
Re: Blessable Boot Partition
We can fix those. You have got grub loading the kernel vmlinuz and initrd.img, so it has done its job, there are just a few more things to do.
1. The ata5 timeout (probably the cd drive) just needs adding a kernel arg in the grub.cfg linux line, I have had to use it, but I will have to go find what it is.
It may depend on the Mac model - what is it?.
2. < ALERT /dev/sda4 does not exist>
just needs you to change the linux root device partition number from 4
in linux /vmlinuz root=/dev/sda4
In my grub.cfg you have -
Code:
menuentry "search-vmlinuz root=sda4" {
search --set /vmlinuz
linux /vmlinuz root=/dev/sda4 agp=off video=efifb
initrd /initrd.img
}
It might be /dev/sda3, if you just have Macosx and Linux.
(There is an empty 200MB EFI partition at /dev/sda1).
To find the partition number, use the grub menuentry Partition List or the grub commandline 'c'
Code:
grub> ls -l
grub> search /vmlinuz
You can use the grub menu editor 'e' and edit the menuentry, F1 will boot from there, then fix it from macosx editor.
3. After fixing that, the next stop will be at the end of the startup messages, when the agpgart and any *_agp modules are loaded, the screen goes to black, just beforee it gets to a text console.
These need to be blacklisted by editing /etc/modprobe.d/blacklist or by adding another blacklist file. I will post this in the other thread, I forgot it there also.
Since you can't write to the ubuntu ext3 file system from macosx,
it will be easiest to use your ubuntu install cd if it is a live cd.
At the same time, if you have installed a desktop, you can edit /etc/X11/xorg.conf to use Driver "fbdev", or you can do that from a root console.
I will add info on that also, its a small one.
Edit:
agp blacklist and desktop xorg.conf for fbdev now on grub efi thread
http://ubuntuforums.org/showthread.php?t=995704
Re: Blessable Boot Partition
the model of my mac is macbook 2,1 (aka santa rosa)
i tried many combinations of /dev/sda# but none of them worked
the comm and "search /vmlinuz" says vmlinuz is on hd0,4
setting root to hd0,4 does not work
setting root to the partition's uuid did not work
copying /dev from my linux partition to my grub partition did not work
i haven't done the blacklist thing yet, or the xorg.conf thing yet
while in grub's terminal, i tried search /dev/, search /dev/sda4, and other things, but it never found any devices
what else can i do?